ACTIVEMQ6-3 Restoring directories removed by accident on previous commit
https://issues.apache.org/jira/browse/ACTIVEMQ6-3 These directories were removed by accident... restoring them now
This commit is contained in:
parent
c6716f2f21
commit
b2ee4f68ca
|
@ -0,0 +1,29 @@
|
||||||
|
body {
|
||||||
|
background: url(images/hornetQ-banner_final.png) top left no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin-top: 110px;
|
||||||
|
font-size: 250%;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background-color: lightgrey;
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: lightgrey;
|
||||||
|
display:block;
|
||||||
|
overflow:auto;
|
||||||
|
border: dotted grey 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
abbr {
|
||||||
|
border-bottom: 1px dotted #333; cursor: help;
|
||||||
|
}
|
||||||
|
|
||||||
|
.missing-doc {
|
||||||
|
background-color: red;
|
||||||
|
border: dotted black 1px;
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
############################################################
|
||||||
|
# Default Logging Configuration File
|
||||||
|
#
|
||||||
|
# You can use a different file by specifying a filename
|
||||||
|
# with the java.util.logging.config.file system property.
|
||||||
|
# For example java -Djava.util.logging.config.file=myfile
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Global properties
|
||||||
|
############################################################
|
||||||
|
|
||||||
|
# "handlers" specifies a comma separated list of log Handler
|
||||||
|
# classes. These handlers will be installed during VM startup.
|
||||||
|
# Note that these classes must be on the system classpath.
|
||||||
|
# By default we only configure a ConsoleHandler, which will only
|
||||||
|
# show messages at the INFO and above levels.
|
||||||
|
handlers=java.util.logging.ConsoleHandler
|
||||||
|
#handlers=java.util.logging.ConsoleHandler,java.util.logging.FileHandler
|
||||||
|
java.util.logging.ConsoleHandler.formatter=org.apache.activemq6.integration.logging.HornetQLoggerFormatter
|
||||||
|
java.util.logging.FileHandler.level=INFO
|
||||||
|
java.util.logging.FileHandler.formatter=org.apache.activemq6.integration.logging.HornetQLoggerFormatter
|
||||||
|
java.util.logging.FileHandler.pattern=logs/hornetq.log
|
||||||
|
# Default global logging level.
|
||||||
|
# This specifies which kinds of events are logged across
|
||||||
|
# all loggers. For any given facility this global level
|
||||||
|
# can be overriden by a facility specific level
|
||||||
|
# Note that the ConsoleHandler also has a separate level
|
||||||
|
# setting to limit messages printed to the console.
|
||||||
|
.level= INFO
|
||||||
|
|
||||||
|
############################################################
|
||||||
|
# Handler specific properties.
|
||||||
|
# Describes specific configuration info for Handlers.
|
||||||
|
############################################################
|
|
@ -0,0 +1 @@
|
||||||
|
server.args=-XX:+UseParallelGC -Xms256M -Xmx256M -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dcom.sun.management.jmxremote -Djava.util.logging.config.file=${imported.basedir}/config/logging.properties -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
|
Binary file not shown.
After Width: | Height: | Size: 107 KiB |
|
@ -0,0 +1,37 @@
|
||||||
|
<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.examples.jms</groupId>
|
||||||
|
<artifactId>jms-examples</artifactId>
|
||||||
|
<version>6.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>activemq-jms-examples-common</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>ActiveMQ6 Examples common</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jboss.spec.javax.jms</groupId>
|
||||||
|
<artifactId>jboss-jms-api_2.0_spec</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-commons</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-core-client</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-jms-client</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1 @@
|
||||||
|
.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;border:1px solid #888}@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}}
|
|
@ -0,0 +1,23 @@
|
||||||
|
function H(){var x=navigator&&navigator.userAgent&&/\bMSIE 6\./.test(navigator.userAgent);H=function(){return x};return x}(function(){function x(b){b=b.split(/ /g);var a={};for(var c=b.length;--c>=0;){var d=b[c];if(d)a[d]=null}return a}var y="break continue do else for if return while ",U=y+"auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile ",D=U+"catch class delete false import new operator private protected public this throw true try ",
|
||||||
|
I=D+"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 ",J=D+"boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",V=J+"as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
|
||||||
|
K=D+"debugger eval export function get null set undefined var with Infinity NaN ",L="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 ",M=y+"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 ",N=y+"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 ",
|
||||||
|
O=y+"case done elif esac eval fi function in local set then until ",W=I+V+K+L+M+N+O;function X(b){return b>="a"&&b<="z"||b>="A"&&b<="Z"}function u(b,a,c,d){b.unshift(c,d||0);try{a.splice.apply(a,b)}finally{b.splice(0,2)}}var Y=(function(){var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break","case","continue",
|
||||||
|
"delete","do","else","finally","instanceof","return","throw","try","typeof"],a="(?:(?:(?:^|[^0-9.])\\.{1,3})|(?:(?:^|[^\\+])\\+)|(?:(?:^|[^\\-])-)";for(var c=0;c<b.length;++c){var d=b[c];a+=X(d.charAt(0))?"|\\b"+d:"|"+d.replace(/([^=<>:&])/g,"\\$1")}a+="|^)\\s*$";return new RegExp(a)})(),P=/&/g,Q=/</g,R=/>/g,Z=/\"/g;function $(b){return b.replace(P,"&").replace(Q,"<").replace(R,">").replace(Z,""")}function E(b){return b.replace(P,"&").replace(Q,"<").replace(R,">")}var aa=
|
||||||
|
/</g,ba=/>/g,ca=/'/g,da=/"/g,ea=/&/g,fa=/ /g;function ga(b){var a=b.indexOf("&");if(a<0)return b;for(--a;(a=b.indexOf("&#",a+1))>=0;){var c=b.indexOf(";",a);if(c>=0){var d=b.substring(a+3,c),g=10;if(d&&d.charAt(0)==="x"){d=d.substring(1);g=16}var e=parseInt(d,g);if(!isNaN(e))b=b.substring(0,a)+String.fromCharCode(e)+b.substring(c+1)}}return b.replace(aa,"<").replace(ba,">").replace(ca,"'").replace(da,'"').replace(ea,"&").replace(fa," ")}function S(b){return"XMP"===b.tagName}
|
||||||
|
function z(b,a){switch(b.nodeType){case 1:var c=b.tagName.toLowerCase();a.push("<",c);for(var d=0;d<b.attributes.length;++d){var g=b.attributes[d];if(!g.specified)continue;a.push(" ");z(g,a)}a.push(">");for(var e=b.firstChild;e;e=e.nextSibling)z(e,a);if(b.firstChild||!/^(?:br|link|img)$/.test(c))a.push("</",c,">");break;case 2:a.push(b.name.toLowerCase(),'="',$(b.value),'"');break;case 3:case 4:a.push(E(b.nodeValue));break}}var F=null;function ha(b){if(null===F){var a=document.createElement("PRE");
|
||||||
|
a.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));F=!/</.test(a.innerHTML)}if(F){var c=b.innerHTML;if(S(b))c=E(c);return c}var d=[];for(var g=b.firstChild;g;g=g.nextSibling)z(g,d);return d.join("")}function ia(b){var a=0;return function(c){var d=null,g=0;for(var e=0,h=c.length;e<h;++e){var f=c.charAt(e);switch(f){case "\t":if(!d)d=[];d.push(c.substring(g,e));var i=b-a%b;a+=i;for(;i>=0;i-=" ".length)d.push(" ".substring(0,i));g=e+1;break;
|
||||||
|
case "\n":a=0;break;default:++a}}if(!d)return c;d.push(c.substring(g));return d.join("")}}var ja=/(?:[^<]+|<!--[\s\S]*?--\>|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g,ka=/^<!--/,la=/^<\[CDATA\[/,ma=/^<br\b/i;function na(b){var a=b.match(ja),c=[],d=0,g=[];if(a)for(var e=0,h=a.length;e<h;++e){var f=a[e];if(f.length>1&&f.charAt(0)==="<"){if(ka.test(f))continue;if(la.test(f)){c.push(f.substring(9,f.length-3));d+=f.length-12}else if(ma.test(f)){c.push("\n");++d}else g.push(d,f)}else{var i=ga(f);
|
||||||
|
c.push(i);d+=i.length}}return{source:c.join(""),tags:g}}function v(b,a){var c={};(function(){var g=b.concat(a);for(var e=g.length;--e>=0;){var h=g[e],f=h[3];if(f)for(var i=f.length;--i>=0;)c[f.charAt(i)]=h}})();var d=a.length;return function(g,e){e=e||0;var h=[e,"pln"],f="",i=0,j=g;while(j.length){var o,m=null,k,l=c[j.charAt(0)];if(l){k=j.match(l[1]);m=k[0];o=l[0]}else{for(var n=0;n<d;++n){l=a[n];var p=l[2];if(p&&!p.test(f))continue;k=j.match(l[1]);if(k){m=k[0];o=l[0];break}}if(!m){o="pln";m=j.substring(0,
|
||||||
|
1)}}h.push(e+i,o);i+=m.length;j=j.substring(m.length);if(o!=="com"&&/\S/.test(m))f=m}return h}}var oa=v([],[["pln",/^[^<]+/,null],["dec",/^<!\w[^>]*(?:>|$)/,null],["com",/^<!--[\s\S]*?(?:--\>|$)/,null],["src",/^<\?[\s\S]*?(?:\?>|$)/,null],["src",/^<%[\s\S]*?(?:%>|$)/,null],["src",/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],["tag",/^<\/?\w[^<>]*>/,null]]);function pa(b){var a=oa(b);for(var c=0;c<a.length;c+=2)if(a[c+1]==="src"){var d,g;d=a[c];g=c+2<a.length?a[c+2]:b.length;var e=b.substring(d,
|
||||||
|
g),h=e.match(/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/);if(h)a.splice(c,2,d,"tag",d+h[1].length,"src",d+h[1].length+(h[2]||"").length,"tag")}return a}var qa=v([["atv",/^\'[^\']*(?:\'|$)/,null,"'"],["atv",/^\"[^\"]*(?:\"|$)/,null,'"'],["pun",/^[<>\/=]+/,null,"<>/="]],[["tag",/^[\w:\-]+/,/^</],["atv",/^[\w\-]+/,/^=/],["atn",/^[\w:\-]+/,null],["pln",/^\s+/,null," \t\r\n"]]);function ra(b,a){for(var c=0;c<a.length;c+=2){var d=a[c+1];if(d==="tag"){var g,e;g=a[c];e=c+2<a.length?a[c+2]:b.length;var h=b.substring(g,
|
||||||
|
e),f=qa(h,g);u(f,a,c,2);c+=f.length-2}}return a}function r(b){var a=[],c=[];if(b.tripleQuotedStrings)a.push(["str",/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]);else if(b.multiLineStrings)a.push(["str",/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]);else a.push(["str",/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
|
||||||
|
null,"\"'"]);c.push(["pln",/^(?:[^\'\"\`\/\#]+)/,null," \r\n"]);if(b.hashComments)a.push(["com",/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments)c.push(["com",/^\/\/[^\r\n]*/,null]);if(b.regexLiterals)c.push(["str",/^\/(?:[^\\\*\/\[]|\\[\s\S]|\[(?:[^\]\\]|\\.)*(?:\]|$))+(?:\/|$)/,Y]);if(b.cStyleComments)c.push(["com",/^\/\*[\s\S]*?(?:\*\/|$)/,null]);var d=x(b.keywords);b=null;var g=v(a,c),e=v([],[["pln",/^\s+/,null," \r\n"],["pln",/^[a-z_$@][a-z_$@0-9]*/i,null],["lit",/^0x[a-f0-9]+[a-z]/i,null],["lit",
|
||||||
|
/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+\-]?\d+)?[a-z]*/i,null,"123456789"],["pun",/^[^\s\w\.$@]+/,null]]);function h(f,i){for(var j=0;j<i.length;j+=2){var o=i[j+1];if(o==="pln"){var m,k,l,n;m=i[j];k=j+2<i.length?i[j+2]:f.length;l=f.substring(m,k);n=e(l,m);for(var p=0,t=n.length;p<t;p+=2){var w=n[p+1];if(w==="pln"){var A=n[p],B=p+2<t?n[p+2]:l.length,s=f.substring(A,B);if(s===".")n[p+1]="pun";else if(s in d)n[p+1]="kwd";else if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(s))n[p+1]=s.charAt(0)==="@"?"lit":
|
||||||
|
"typ"}}u(n,i,j,2);j+=n.length-2}}return i}return function(f){var i=g(f);i=h(f,i);return i}}var G=r({keywords:W,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function sa(b,a){for(var c=0;c<a.length;c+=2){var d=a[c+1];if(d==="src"){var g,e;g=a[c];e=c+2<a.length?a[c+2]:b.length;var h=G(b.substring(g,e));for(var f=0,i=h.length;f<i;f+=2)h[f]+=g;u(h,a,c,2);c+=h.length-2}}return a}function ta(b,a){var c=false;for(var d=0;d<a.length;d+=2){var g=a[d+1],e,h;if(g==="atn"){e=
|
||||||
|
a[d];h=d+2<a.length?a[d+2]:b.length;c=/^on|^style$/i.test(b.substring(e,h))}else if(g==="atv"){if(c){e=a[d];h=d+2<a.length?a[d+2]:b.length;var f=b.substring(e,h),i=f.length,j=i>=2&&/^[\"\']/.test(f)&&f.charAt(0)===f.charAt(i-1),o,m,k;if(j){m=e+1;k=h-1;o=f}else{m=e+1;k=h-1;o=f.substring(1,f.length-1)}var l=G(o);for(var n=0,p=l.length;n<p;n+=2)l[n]+=m;if(j){l.push(k,"atv");u(l,a,d+2,0)}else u(l,a,d,2)}c=false}}return a}function ua(b){var a=pa(b);a=ra(b,a);a=sa(b,a);a=ta(b,a);return a}function va(b,
|
||||||
|
a,c){var d=[],g=0,e=null,h=null,f=0,i=0,j=ia(8);function o(k){if(k>g){if(e&&e!==h){d.push("</span>");e=null}if(!e&&h){e=h;d.push('<span class="',e,'">')}var l=E(j(b.substring(g,k))).replace(/(\r\n?|\n| ) /g,"$1 ").replace(/\r\n?|\n/g,"<br />");d.push(l);g=k}}while(true){var m;m=f<a.length?(i<c.length?a[f]<=c[i]:true):false;if(m){o(a[f]);if(e){d.push("</span>");e=null}d.push(a[f+1]);f+=2}else if(i<c.length){o(c[i]);h=c[i+1];i+=2}else break}o(b.length);if(e)d.push("</span>");return d.join("")}
|
||||||
|
var C={};function q(b,a){for(var c=a.length;--c>=0;){var d=a[c];if(!C.hasOwnProperty(d))C[d]=b;else if("console"in window)console.log("cannot override language handler %s",d)}}q(G,["default-code"]);q(ua,["default-markup","html","htm","xhtml","xml","xsl"]);q(r({keywords:I,hashComments:true,cStyleComments:true}),["c","cc","cpp","cs","cxx","cyc"]);q(r({keywords:J,cStyleComments:true}),["java"]);q(r({keywords:O,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);q(r({keywords:M,hashComments:true,
|
||||||
|
multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);q(r({keywords:L,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);q(r({keywords:N,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);q(r({keywords:K,cStyleComments:true,regexLiterals:true}),["js"]);function T(b,a){try{var c=na(b),d=c.source,g=c.tags;if(!C.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";var e=C[a].call({},d);return va(d,g,e)}catch(h){if("console"in window){console.log(h);
|
||||||
|
console.trace()}return b}}function wa(b){var a=H(),c=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],d=[];for(var g=0;g<c.length;++g)for(var e=0;e<c[g].length;++e)d.push(c[g][e]);c=null;var h=0;function f(){var i=(new Date).getTime()+250;for(;h<d.length&&(new Date).getTime()<i;h++){var j=d[h];if(j.className&&j.className.indexOf("prettyprint")>=0){var o=j.className.match(/\blang-(\w+)\b/);if(o)o=o[1];var m=false;for(var k=j.parentNode;k;k=
|
||||||
|
k.parentNode)if((k.tagName==="pre"||k.tagName==="code"||k.tagName==="xmp")&&k.className&&k.className.indexOf("prettyprint")>=0){m=true;break}if(!m){var l=ha(j);l=l.replace(/(?:\r\n?|\n)$/,"");var n=T(l,o);if(!S(j))j.innerHTML=n;else{var p=document.createElement("PRE");for(var t=0;t<j.attributes.length;++t){var w=j.attributes[t];if(w.specified)p.setAttribute(w.name,w.value)}p.innerHTML=n;j.parentNode.replaceChild(p,j);p=j}if(a&&j.tagName==="PRE"){var A=j.getElementsByTagName("br");for(var B=A.length;--B>=
|
||||||
|
0;){var s=A[B];s.parentNode.replaceChild(document.createTextNode("\r\n"),s)}}}}}if(h<d.length)setTimeout(f,250);else if(b)b()}f()}window.PR_normalizedHtml=z;window.prettyPrintOne=T;window.prettyPrint=wa;window.PR={createSimpleLexer:v,registerLangHandler:q,sourceDecorator:r,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
|
|
@ -0,0 +1,207 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2005-2014 Red Hat, Inc.
|
||||||
|
* Red Hat licenses this file to you under the Apache License, version
|
||||||
|
* 2.0 (the "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
* implied. See the License for the specific language governing
|
||||||
|
* permissions and limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.apache.activemq6.common.example;
|
||||||
|
|
||||||
|
import javax.transaction.xa.Xid;
|
||||||
|
|
||||||
|
import org.apache.activemq6.utils.Base64;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
|
||||||
|
*/
|
||||||
|
public class DummyXid implements Xid
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 407053232840068514L;
|
||||||
|
|
||||||
|
private final byte[] branchQualifier;
|
||||||
|
|
||||||
|
private final int formatId;
|
||||||
|
|
||||||
|
private final byte[] globalTransactionId;
|
||||||
|
|
||||||
|
private int hash;
|
||||||
|
|
||||||
|
private boolean hashCalculated;
|
||||||
|
|
||||||
|
// Static --------------------------------------------------------
|
||||||
|
|
||||||
|
public static String toBase64String(final Xid xid)
|
||||||
|
{
|
||||||
|
return Base64.encodeBytes(DummyXid.toByteArray(xid));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static byte[] toByteArray(final Xid xid)
|
||||||
|
{
|
||||||
|
byte[] branchQualifier = xid.getBranchQualifier();
|
||||||
|
byte[] globalTransactionId = xid.getGlobalTransactionId();
|
||||||
|
int formatId = xid.getFormatId();
|
||||||
|
|
||||||
|
byte[] hashBytes = new byte[branchQualifier.length + globalTransactionId.length + 4];
|
||||||
|
System.arraycopy(branchQualifier, 0, hashBytes, 0, branchQualifier.length);
|
||||||
|
System.arraycopy(globalTransactionId, 0, hashBytes, branchQualifier.length, globalTransactionId.length);
|
||||||
|
byte[] intBytes = new byte[4];
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
intBytes[i] = (byte)((formatId >> i * 8) % 0xFF);
|
||||||
|
}
|
||||||
|
System.arraycopy(intBytes, 0, hashBytes, branchQualifier.length + globalTransactionId.length, 4);
|
||||||
|
return hashBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Constructors --------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Standard constructor
|
||||||
|
* @param branchQualifier
|
||||||
|
* @param formatId
|
||||||
|
* @param globalTransactionId
|
||||||
|
*/
|
||||||
|
public DummyXid(final byte[] branchQualifier, final int formatId, final byte[] globalTransactionId)
|
||||||
|
{
|
||||||
|
this.branchQualifier = branchQualifier;
|
||||||
|
this.formatId = formatId;
|
||||||
|
this.globalTransactionId = globalTransactionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy constructor
|
||||||
|
* @param other
|
||||||
|
*/
|
||||||
|
public DummyXid(final Xid other)
|
||||||
|
{
|
||||||
|
branchQualifier = copyBytes(other.getBranchQualifier());
|
||||||
|
formatId = other.getFormatId();
|
||||||
|
globalTransactionId = copyBytes(other.getGlobalTransactionId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Xid implementation ------------------------------------------------------------------
|
||||||
|
|
||||||
|
public byte[] getBranchQualifier()
|
||||||
|
{
|
||||||
|
return branchQualifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFormatId()
|
||||||
|
{
|
||||||
|
return formatId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getGlobalTransactionId()
|
||||||
|
{
|
||||||
|
return globalTransactionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Public -------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode()
|
||||||
|
{
|
||||||
|
if (!hashCalculated)
|
||||||
|
{
|
||||||
|
calcHash();
|
||||||
|
}
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(final Object other)
|
||||||
|
{
|
||||||
|
if (this == other)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(other instanceof Xid))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Xid xother = (Xid)other;
|
||||||
|
if (xother.getFormatId() != formatId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (xother.getBranchQualifier().length != branchQualifier.length)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (xother.getGlobalTransactionId().length != globalTransactionId.length)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < branchQualifier.length; i++)
|
||||||
|
{
|
||||||
|
byte[] otherBQ = xother.getBranchQualifier();
|
||||||
|
if (branchQualifier[i] != otherBQ[i])
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < globalTransactionId.length; i++)
|
||||||
|
{
|
||||||
|
byte[] otherGtx = xother.getGlobalTransactionId();
|
||||||
|
if (globalTransactionId[i] != otherGtx[i])
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "XidImpl (" + System.identityHashCode(this) +
|
||||||
|
" bq:" +
|
||||||
|
stringRep(branchQualifier) +
|
||||||
|
" formatID:" +
|
||||||
|
formatId +
|
||||||
|
" gtxid:" +
|
||||||
|
stringRep(globalTransactionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private -------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
private String stringRep(final byte[] bytes)
|
||||||
|
{
|
||||||
|
StringBuilder buff = new StringBuilder();
|
||||||
|
for (int i = 0; i < bytes.length; i++)
|
||||||
|
{
|
||||||
|
byte b = bytes[i];
|
||||||
|
|
||||||
|
buff.append(b);
|
||||||
|
|
||||||
|
if (i != bytes.length - 1)
|
||||||
|
{
|
||||||
|
buff.append('.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return buff.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void calcHash()
|
||||||
|
{
|
||||||
|
byte[] hashBytes = DummyXid.toByteArray(this);
|
||||||
|
String s = new String(hashBytes);
|
||||||
|
hash = s.hashCode();
|
||||||
|
hashCalculated = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] copyBytes(final byte[] other)
|
||||||
|
{
|
||||||
|
byte[] bytes = new byte[other.length];
|
||||||
|
|
||||||
|
System.arraycopy(other, 0, bytes, 0, other.length);
|
||||||
|
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,234 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2005-2014 Red Hat, Inc.
|
||||||
|
* Red Hat licenses this file to you under the Apache License, version
|
||||||
|
* 2.0 (the "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
* implied. See the License for the specific language governing
|
||||||
|
* permissions and limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.apache.activemq6.common.example;
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import javax.jms.Connection;
|
||||||
|
import javax.jms.JMSException;
|
||||||
|
import javax.naming.InitialContext;
|
||||||
|
|
||||||
|
import org.apache.activemq6.api.core.TransportConfiguration;
|
||||||
|
import org.apache.activemq6.api.core.client.ClientSession;
|
||||||
|
import org.apache.activemq6.api.jms.HornetQJMSClient;
|
||||||
|
import org.apache.activemq6.api.jms.JMSFactoryType;
|
||||||
|
import org.apache.activemq6.core.client.impl.DelegatingSession;
|
||||||
|
import org.apache.activemq6.core.remoting.impl.netty.NettyConnectorFactory;
|
||||||
|
import org.apache.activemq6.jms.client.HornetQConnection;
|
||||||
|
import org.apache.activemq6.jms.client.HornetQConnectionFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base class for HornetQ examples.
|
||||||
|
* <p>
|
||||||
|
* This takes care of starting and stopping the server as well as deploying any
|
||||||
|
* queue needed.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:andy.taylor@jboss.org">Andy Taylor</a>
|
||||||
|
*/
|
||||||
|
public abstract class HornetQExample
|
||||||
|
{
|
||||||
|
protected static final Logger log = Logger.getLogger(HornetQExample.class
|
||||||
|
.getName());
|
||||||
|
|
||||||
|
protected boolean failure = false;
|
||||||
|
|
||||||
|
private String[] args;
|
||||||
|
|
||||||
|
public abstract boolean runExample() throws Exception;
|
||||||
|
|
||||||
|
protected void run(final String[] args1)
|
||||||
|
{
|
||||||
|
this.args = args1;
|
||||||
|
//if we have a cluster of servers wait a while for the cluster to form properly
|
||||||
|
if(args != null && args.length > 1)
|
||||||
|
{
|
||||||
|
System.out.println("****pausing to allow cluster to form****");
|
||||||
|
Thread.yield();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Thread.sleep(2000);
|
||||||
|
}
|
||||||
|
catch (InterruptedException e)
|
||||||
|
{
|
||||||
|
//ignore
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!runExample())
|
||||||
|
{
|
||||||
|
failure = true;
|
||||||
|
}
|
||||||
|
System.out.println("example complete");
|
||||||
|
}
|
||||||
|
catch (Throwable e)
|
||||||
|
{
|
||||||
|
failure = true;
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
reportResultAndExit();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void killServer(final int id) throws Exception
|
||||||
|
{
|
||||||
|
String configDir = System.getProperty("exampleConfigDir");
|
||||||
|
if(configDir == null)
|
||||||
|
{
|
||||||
|
throw new Exception("exampleConfigDir must be set as a system property");
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("Killing server " + id);
|
||||||
|
|
||||||
|
// We kill the server by creating a new file in the server dir which is checked for by the server
|
||||||
|
// We can't use Process.destroy() since this does not do a hard kill - it causes shutdown hooks
|
||||||
|
// to be called which cleanly shutdown the server
|
||||||
|
System.out.println(configDir + "/server" + id + "/KILL_ME");
|
||||||
|
File file = new File(configDir + "/server" + id + "/KILL_ME");
|
||||||
|
|
||||||
|
file.createNewFile();
|
||||||
|
|
||||||
|
// Sleep longer than the KillChecker check period
|
||||||
|
Thread.sleep(3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void killServer(final int id, final int serverToWaitFor) throws Exception
|
||||||
|
{
|
||||||
|
String configDir = System.getProperty("exampleConfigDir");
|
||||||
|
if(configDir == null)
|
||||||
|
{
|
||||||
|
throw new Exception("exampleConfigDir must be set as a system property");
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("Killing server " + id);
|
||||||
|
|
||||||
|
// We kill the server by creating a new file in the server dir which is checked for by the server
|
||||||
|
// We can't use Process.destroy() since this does not do a hard kill - it causes shutdown hooks
|
||||||
|
// to be called which cleanly shutdown the server
|
||||||
|
System.out.println(configDir + "/server" + id + "/KILL_ME");
|
||||||
|
File file = new File(configDir + "/server" + id + "/KILL_ME");
|
||||||
|
|
||||||
|
file.createNewFile();
|
||||||
|
|
||||||
|
waitForServerStart(serverToWaitFor, 20000);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void reStartServer(final int id, final long timeout) throws Exception
|
||||||
|
{
|
||||||
|
String configDir = System.getProperty("exampleConfigDir");
|
||||||
|
if(configDir == null)
|
||||||
|
{
|
||||||
|
throw new Exception("exampleConfigDir must be set as a system property");
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println("restarting server " + id);
|
||||||
|
|
||||||
|
// We kill the server by creating a new file in the server dir which is checked for by the server
|
||||||
|
// We can't use Process.destroy() since this does not do a hard kill - it causes shutdown hooks
|
||||||
|
// to be called which cleanly shutdown the server
|
||||||
|
File file = new File(configDir + "/server" + id + "/RESTART_ME");
|
||||||
|
|
||||||
|
file.createNewFile();
|
||||||
|
|
||||||
|
waitForServerStart(id, timeout);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void waitForServerStart(int id, long timeout) throws InterruptedException
|
||||||
|
{
|
||||||
|
// wait for restart
|
||||||
|
long time = System.currentTimeMillis();
|
||||||
|
while (time < System.currentTimeMillis() + timeout)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HashMap<String, Object> params = new HashMap<String, Object>();
|
||||||
|
params.put("host", "localhost");
|
||||||
|
params.put("port", 5445 + id);
|
||||||
|
TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(), params);
|
||||||
|
HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
|
||||||
|
cf.createConnection().close();
|
||||||
|
System.out.println("server restarted");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
System.out.println("awaiting server restart");
|
||||||
|
Thread.sleep(1000);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected InitialContext getContext(final int serverId) throws Exception
|
||||||
|
{
|
||||||
|
HornetQExample.log.info("using " + args[serverId] + " for jndi");
|
||||||
|
Properties props = new Properties();
|
||||||
|
props.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
|
||||||
|
props.put("java.naming.provider.url", args[serverId]);
|
||||||
|
props.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
|
||||||
|
return new InitialContext(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int getServer(Connection connection)
|
||||||
|
{
|
||||||
|
ClientSession session = ((HornetQConnection) connection).getInitialSession();
|
||||||
|
TransportConfiguration transportConfiguration = session.getSessionFactory().getConnectorConfiguration();
|
||||||
|
String port = (String) transportConfiguration.getParams().get("port");
|
||||||
|
return Integer.valueOf(port) - 5445;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Connection getServerConnection(int server, Connection... connections)
|
||||||
|
{
|
||||||
|
for (Connection connection : connections)
|
||||||
|
{
|
||||||
|
ClientSession session = ((HornetQConnection) connection).getInitialSession();
|
||||||
|
TransportConfiguration transportConfiguration = session.getSessionFactory().getConnectorConfiguration();
|
||||||
|
String port = (String) transportConfiguration.getParams().get("port");
|
||||||
|
if(Integer.valueOf(port) == server + 5445)
|
||||||
|
{
|
||||||
|
return connection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void reportResultAndExit()
|
||||||
|
{
|
||||||
|
if (failure)
|
||||||
|
{
|
||||||
|
System.err.println();
|
||||||
|
System.err.println("#####################");
|
||||||
|
System.err.println("### FAILURE! ###");
|
||||||
|
System.err.println("#####################");
|
||||||
|
throw new RuntimeException("failure in running example");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.out.println();
|
||||||
|
System.out.println("#####################");
|
||||||
|
System.out.println("### SUCCESS! ###");
|
||||||
|
System.out.println("#####################");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected static final void closeConnection(final Connection connection) throws JMSException
|
||||||
|
{
|
||||||
|
if (connection != null)
|
||||||
|
{
|
||||||
|
connection.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,82 @@
|
||||||
|
<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.examples.jms</groupId>
|
||||||
|
<artifactId>jms-examples</artifactId>
|
||||||
|
<version>6.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>activemq-rar</artifactId>
|
||||||
|
<packaging>rar</packaging>
|
||||||
|
<name>ActiveMQ6 JMS RA</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-jms-client</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-core-client</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-jms-client</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.jboss.spec.javax.jms</groupId>
|
||||||
|
<artifactId>jboss-jms-api_2.0_spec</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.jboss.spec.javax.transaction</groupId>
|
||||||
|
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>jboss.jbossts.jts</groupId>
|
||||||
|
<artifactId>jbossjts-jacorb</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-ra</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-jms-server</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-core-client</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.apache.activemq</groupId>
|
||||||
|
<artifactId>activemq-core-client</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.netty</groupId>
|
||||||
|
<artifactId>netty-all</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-rar-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<raXmlFile>src/main/resources/ra.xml</raXmlFile>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
|
@ -0,0 +1,304 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!-- $Id: ra.xml 76819 2008-08-08 11:04:20Z jesper.pedersen $ -->
|
||||||
|
|
||||||
|
<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>HornetQ 2.0 Resource Adapter</description>
|
||||||
|
<display-name>HornetQ 2.0 Resource Adapter</display-name>
|
||||||
|
|
||||||
|
<vendor-name>Red Hat Middleware LLC</vendor-name>
|
||||||
|
<eis-type>JMS 1.1 Server</eis-type>
|
||||||
|
<resourceadapter-version>1.0</resourceadapter-version>
|
||||||
|
|
||||||
|
<license>
|
||||||
|
<description>
|
||||||
|
Copyright 2009 Red Hat, Inc.
|
||||||
|
Red Hat licenses this file to you under the Apache License, version
|
||||||
|
2.0 (the "License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT 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.activemq6.ra.HornetQResourceAdapter</resourceadapter-class>
|
||||||
|
<config-property>
|
||||||
|
<description>
|
||||||
|
The transport type. Multiple connectors can be configured by using a comma separated list,
|
||||||
|
i.e. org.apache.activemq6.core.remoting.impl.invm.InVMConnectorFactory,org.apache.activemq6.core.remoting.impl.invm.InVMConnectorFactory.
|
||||||
|
</description>
|
||||||
|
<config-property-name>ConnectorClassName</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value>org.apache.activemq6.core.remoting.impl.invm.InVMConnectorFactory</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The transport configuration. These values must be in the form of key=val;key=val;,
|
||||||
|
if multiple connectors are used then each set must be separated by a comma i.e. host=host1;port=5445,host=host2;port=5446.
|
||||||
|
Each set of params maps to the connector classname specified.
|
||||||
|
</description>
|
||||||
|
<config-property-name>ConnectionParameters</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value>server-id=0</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<!--
|
||||||
|
<config-property>
|
||||||
|
<description>Does we support HA</description>
|
||||||
|
<config-property-name>HA</config-property-name>
|
||||||
|
<config-property-type>java.lang.Boolean</config-property-type>
|
||||||
|
<config-property-value>false</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The method to use for locating the transactionmanager</description>
|
||||||
|
<config-property-name>TransactionManagerLocatorMethod</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value>getTm</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>Use A local Transaction instead of XA?</description>
|
||||||
|
<config-property-name>UseLocalTx</config-property-name>
|
||||||
|
<config-property-type>java.lang.Boolean</config-property-type>
|
||||||
|
<config-property-value>false</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The user name used to login to the JMS server</description>
|
||||||
|
<config-property-name>UserName</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The password used to login to the JMS server</description>
|
||||||
|
<config-property-name>Password</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The jndi params to use to look up the jms resources if local jndi is not to be used</description>
|
||||||
|
<config-property-name>JndiParams</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory;java.naming.provider.url=jnp://localhost:1199;java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The jGroups File name</description>
|
||||||
|
<config-property-name>JgroupsFile</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value>jgroups.xml</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The name of the channel used on this configuration</description>
|
||||||
|
<config-property-name>JgroupsChannelName</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value>my-channel</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The discovery group address</description>
|
||||||
|
<config-property-name>DiscoveryAddress</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The discovery group port</description>
|
||||||
|
<config-property-name>DiscoveryPort</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The discovery refresh timeout</description>
|
||||||
|
<config-property-name>DiscoveryRefreshTimeout</config-property-name>
|
||||||
|
<config-property-type>java.lang.Long</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The discovery initial wait timeout</description>
|
||||||
|
<config-property-name>DiscoveryInitialWaitTimeout</config-property-name>
|
||||||
|
<config-property-type>java.lang.Long</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The load balancing policy class name</description>
|
||||||
|
<config-property-name>LoadBalancingPolicyClassName</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The client failure check period</description>
|
||||||
|
<config-property-name>ClientFailureCheckPeriod</config-property-name>
|
||||||
|
<config-property-type>java.lang.Long</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The connection TTL</description>
|
||||||
|
<config-property-name>ConnectionTTL</config-property-name>
|
||||||
|
<config-property-type>java.lang.Long</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The call timeout</description>
|
||||||
|
<config-property-name>CallTimeout</config-property-name>
|
||||||
|
<config-property-type>java.lang.Long</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The dups ok batch size</description>
|
||||||
|
<config-property-name>DupsOKBatchSize</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The transaction batch size</description>
|
||||||
|
<config-property-name>TransactionBatchSize</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The consumer window size</description>
|
||||||
|
<config-property-name>ConsumerWindowSize</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The consumer max rate</description>
|
||||||
|
<config-property-name>ConsumerMaxRate</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The confirmation window size</description>
|
||||||
|
<config-property-name>ConfirmationWindowSize</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The producer max rate</description>
|
||||||
|
<config-property-name>ProducerMaxRate</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The min large message size</description>
|
||||||
|
<config-property-name>MinLargeMessageSize</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The block on acknowledge</description>
|
||||||
|
<config-property-name>BlockOnAcknowledge</config-property-name>
|
||||||
|
<config-property-type>java.lang.Boolean</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The block on non durable send</description>
|
||||||
|
<config-property-name>BlockOnNonDurableSend</config-property-name>
|
||||||
|
<config-property-type>java.lang.Boolean</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The block on durable send</description>
|
||||||
|
<config-property-name>BlockOnDurableSend</config-property-name>
|
||||||
|
<config-property-type>java.lang.Boolean</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The auto group</description>
|
||||||
|
<config-property-name>AutoGroup</config-property-name>
|
||||||
|
<config-property-type>java.lang.Boolean</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The max connections</description>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The pre acknowledge</description>
|
||||||
|
<config-property-name>PreAcknowledge</config-property-name>
|
||||||
|
<config-property-type>java.lang.Boolean</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The retry interval</description>
|
||||||
|
<config-property-name>RetryInterval</config-property-name>
|
||||||
|
<config-property-type>java.lang.Long</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The retry interval multiplier</description>
|
||||||
|
<config-property-name>RetryIntervalMultiplier</config-property-name>
|
||||||
|
<config-property-type>java.lang.Double</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The client id</description>
|
||||||
|
<config-property-name>ClientID</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>Whether the password is cleartext or encrypted, default false</description>
|
||||||
|
<config-property-name>UseMaskedPassword</config-property-name>
|
||||||
|
<config-property-type>java.lang.Boolean</config-property-type>
|
||||||
|
<config-property-value></config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>The class definition (full qualified name and its properties) used to encrypt the password</description>
|
||||||
|
<config-property-name>PasswordCodec</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value>org.apache.activemq6.utils.DefaultSensitiveStringCodec;key=clusterpassword;algorithm=something</config-property-value>
|
||||||
|
</config-property>-->
|
||||||
|
|
||||||
|
<outbound-resourceadapter>
|
||||||
|
<connection-definition>
|
||||||
|
<managedconnectionfactory-class>org.apache.activemq6.ra.HornetQRAManagedConnectionFactory</managedconnectionfactory-class>
|
||||||
|
|
||||||
|
<config-property>
|
||||||
|
<description>The default session type</description>
|
||||||
|
<config-property-name>SessionDefaultType</config-property-name>
|
||||||
|
<config-property-type>java.lang.String</config-property-type>
|
||||||
|
<config-property-value>javax.jms.Queue</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
<config-property>
|
||||||
|
<description>Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality</description>
|
||||||
|
<config-property-name>UseTryLock</config-property-name>
|
||||||
|
<config-property-type>java.lang.Integer</config-property-type>
|
||||||
|
<config-property-value>0</config-property-value>
|
||||||
|
</config-property>
|
||||||
|
|
||||||
|
<connectionfactory-interface>org.apache.activemq6.ra.HornetQRAConnectionFactory</connectionfactory-interface>
|
||||||
|
<connectionfactory-impl-class>org.apache.activemq6.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
|
||||||
|
<connection-interface>javax.jms.Session</connection-interface>
|
||||||
|
<connection-impl-class>org.apache.activemq6.ra.HornetQRASession</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.activemq6.ra.inflow.HornetQActivationSpec</activationspec-class>
|
||||||
|
<required-config-property>
|
||||||
|
<config-property-name>destination</config-property-name>
|
||||||
|
</required-config-property>
|
||||||
|
</activationspec>
|
||||||
|
</messagelistener>
|
||||||
|
</messageadapter>
|
||||||
|
</inbound-resourceadapter>
|
||||||
|
|
||||||
|
</resourceadapter>
|
||||||
|
</connector>
|
Loading…
Reference in New Issue