JBoss hornetq SVN: r9171 - in trunk: src/main/org/hornetq/core/message/impl and 4 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2010-04-26 20:41:55 -0400 (Mon, 26 Apr 2010)
New Revision: 9171
Modified:
trunk/src/main/org/hornetq/core/client/impl/ClientMessageImpl.java
trunk/src/main/org/hornetq/core/client/impl/ClientProducerImpl.java
trunk/src/main/org/hornetq/core/client/impl/LargeMessageBufferImpl.java
trunk/src/main/org/hornetq/core/message/impl/MessageImpl.java
trunk/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java
trunk/tests/src/org/hornetq/tests/integration/jms/largemessage/JMSLargeMessageTest.java
trunk/tests/src/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java
Log:
HORNETQ-296 - LargeMessage and producer
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientMessageImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientMessageImpl.java 2010-04-26 16:25:35 UTC (rev 9170)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientMessageImpl.java 2010-04-27 00:41:55 UTC (rev 9171)
@@ -25,6 +25,7 @@
import org.hornetq.core.logging.Logger;
import org.hornetq.core.message.BodyEncoder;
import org.hornetq.core.message.impl.MessageImpl;
+import org.hornetq.utils.DataConstants;
/**
*
@@ -249,6 +250,7 @@
public void open()
{
+ getBodyBuffer().readerIndex(0);
}
public void close()
@@ -257,7 +259,14 @@
public long getLargeBodySize()
{
- return buffer.writerIndex();
+ if (isLargeMessage())
+ {
+ return getBodyBuffer().writerIndex();
+ }
+ else
+ {
+ return getBodyBuffer().writerIndex() - BODY_OFFSET;
+ }
}
public int encode(final ByteBuffer bufferRead) throws HornetQException
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientProducerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientProducerImpl.java 2010-04-26 16:25:35 UTC (rev 9170)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientProducerImpl.java 2010-04-27 00:41:55 UTC (rev 9171)
@@ -217,7 +217,7 @@
boolean isLarge;
- if (msgI.getBodyInputStream() != null || msgI.isLargeMessage())
+ if (msgI.getBodyInputStream() != null || msgI.isLargeMessage() || msgI.getBodyBuffer().writerIndex() > minLargeMessageSize)
{
isLarge = true;
}
Modified: trunk/src/main/org/hornetq/core/client/impl/LargeMessageBufferImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/LargeMessageBufferImpl.java 2010-04-26 16:25:35 UTC (rev 9170)
+++ trunk/src/main/org/hornetq/core/client/impl/LargeMessageBufferImpl.java 2010-04-27 00:41:55 UTC (rev 9171)
@@ -27,6 +27,7 @@
import java.util.concurrent.TimeUnit;
import org.hornetq.api.core.HornetQBuffer;
+import org.hornetq.api.core.HornetQBuffers;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.logging.Logger;
@@ -60,6 +61,8 @@
private volatile SessionReceiveContinuationMessage currentPacket = null;
private final long totalSize;
+
+ private final int bufferSize;
private boolean streamEnded = false;
@@ -97,6 +100,15 @@
final int readTimeout,
final File cachedFile)
{
+ this(consumerInternal, totalSize, readTimeout, cachedFile, 10 * 1024);
+ }
+
+ public LargeMessageBufferImpl(final ClientConsumerInternal consumerInternal,
+ final long totalSize,
+ final int readTimeout,
+ final File cachedFile,
+ final int bufferSize)
+ {
this.consumerInternal = consumerInternal;
this.readTimeout = readTimeout;
this.totalSize = totalSize;
@@ -108,6 +120,7 @@
{
fileCache = new FileCache(cachedFile);
}
+ this.bufferSize = bufferSize;
}
// Public --------------------------------------------------------
@@ -193,6 +206,7 @@
}
}
+
packets.offer(packet);
}
}
@@ -1020,7 +1034,30 @@
{
return (char)readShort();
}
+
+ public char getChar(final int index)
+ {
+ return (char)getShort(index);
+ }
+ public double getDouble(final int index)
+ {
+ return Double.longBitsToDouble(getLong(index));
+ }
+
+ public float getFloat(final int index)
+ {
+ return Float.intBitsToFloat(getInt(index));
+ }
+
+ public HornetQBuffer readBytes(final int length)
+ {
+ byte bytesToGet[] = new byte[length];
+ getBytes(readerIndex, bytesToGet);
+ readerIndex += length;
+ return HornetQBuffers.wrappedBuffer(bytesToGet);
+ }
+
/* (non-Javadoc)
* @see org.hornetq.spi.core.remoting.HornetQBuffer#readDouble()
*/
@@ -1313,8 +1350,6 @@
private class FileCache
{
- private final int BUFFER_SIZE = 10 * 1024;
-
public FileCache(final File cachedFile)
{
this.cachedFile = cachedFile;
@@ -1347,11 +1382,13 @@
throw new ArrayIndexOutOfBoundsException("position > " + cachedChannel.size());
}
- readCachePositionStart = position / BUFFER_SIZE * BUFFER_SIZE;
+ readCachePositionStart = position / bufferSize * bufferSize;
+
+ cachedChannel.position(readCachePositionStart);
if (readCache == null)
{
- readCache = ByteBuffer.allocate(BUFFER_SIZE);
+ readCache = ByteBuffer.allocate(bufferSize);
}
readCache.clear();
@@ -1452,80 +1489,47 @@
public ChannelBuffer channelBuffer()
{
- // TODO Auto-generated method stub
return null;
}
public HornetQBuffer copy(final int index, final int length)
{
- // TODO Auto-generated method stub
- return null;
+ throw new IllegalAccessError(LargeMessageBufferImpl.READ_ONLY_ERROR_MESSAGE);
}
public HornetQBuffer duplicate()
{
- // TODO Auto-generated method stub
- return null;
+ throw new IllegalAccessError(LargeMessageBufferImpl.READ_ONLY_ERROR_MESSAGE);
}
- public char getChar(final int index)
- {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public double getDouble(final int index)
- {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public float getFloat(final int index)
- {
- // TODO Auto-generated method stub
- return 0;
- }
-
- public HornetQBuffer readBytes(final int length)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
public HornetQBuffer readSlice(final int length)
{
- // TODO Auto-generated method stub
- return null;
+ throw new IllegalAccessError(LargeMessageBufferImpl.READ_ONLY_ERROR_MESSAGE);
}
public void setChar(final int index, final char value)
{
- // TODO Auto-generated method stub
-
+ throw new IllegalAccessError(LargeMessageBufferImpl.READ_ONLY_ERROR_MESSAGE);
}
public void setDouble(final int index, final double value)
{
- // TODO Auto-generated method stub
-
+ throw new IllegalAccessError(LargeMessageBufferImpl.READ_ONLY_ERROR_MESSAGE);
}
public void setFloat(final int index, final float value)
{
- // TODO Auto-generated method stub
-
+ throw new IllegalAccessError(LargeMessageBufferImpl.READ_ONLY_ERROR_MESSAGE);
}
public HornetQBuffer slice()
{
- // TODO Auto-generated method stub
- return null;
+ throw new IllegalAccessError(LargeMessageBufferImpl.READ_ONLY_ERROR_MESSAGE);
}
public void writeBytes(final HornetQBuffer src, final int srcIndex, final int length)
{
- // TODO Auto-generated method stub
-
+ throw new IllegalAccessError(LargeMessageBufferImpl.READ_ONLY_ERROR_MESSAGE);
}
}
Modified: trunk/src/main/org/hornetq/core/message/impl/MessageImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/message/impl/MessageImpl.java 2010-04-26 16:25:35 UTC (rev 9170)
+++ trunk/src/main/org/hornetq/core/message/impl/MessageImpl.java 2010-04-27 00:41:55 UTC (rev 9171)
@@ -55,7 +55,10 @@
public static final SimpleString HDR_ROUTE_TO_IDS = new SimpleString("_HQ_ROUTE_TO");
public static final int BUFFER_HEADER_SPACE = PacketImpl.PACKET_HEADERS_SIZE;
+
+ public static final int BODY_OFFSET = BUFFER_HEADER_SPACE + DataConstants.SIZE_INT;
+
protected long messageID;
protected SimpleString address;
@@ -248,7 +251,7 @@
{
if (buffer instanceof LargeMessageBufferInternal == false)
{
- bodyBuffer = new ResetLimitWrappedHornetQBuffer(BUFFER_HEADER_SPACE + DataConstants.SIZE_INT, buffer, this);
+ bodyBuffer = new ResetLimitWrappedHornetQBuffer(BODY_OFFSET, buffer, this);
}
else
{
Modified: trunk/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java 2010-04-26 16:25:35 UTC (rev 9170)
+++ trunk/tests/src/org/hornetq/tests/integration/client/LargeMessageTest.java 2010-04-27 00:41:55 UTC (rev 9171)
@@ -137,6 +137,109 @@
}
}
+
+ public void testLargeBufferTransacted() throws Exception
+ {
+ doTestLargeBuffer(true);
+ }
+
+ public void testLargeBufferNotTransacted() throws Exception
+ {
+ doTestLargeBuffer(false);
+ }
+
+ public void doTestLargeBuffer(boolean transacted) throws Exception
+ {
+ final int journalsize = 100 * 1024;
+ final int messageSize = 3 * journalsize;
+ // final int messageSize = 5 * 1024;
+
+ ClientSession session = null;
+
+ try
+ {
+ Configuration config = createDefaultConfig(isNetty());
+ config.setJournalFileSize(journalsize);
+
+ config.setJournalBufferSize_AIO(10 * 1024);
+ config.setJournalBufferSize_NIO(10 * 1024);
+
+ server = createServer(true, config);
+
+ server.start();
+
+ ClientSessionFactory sf = createFactory(isNetty());
+
+ session = sf.createSession(!transacted, !transacted, 0);
+
+ session.createQueue(LargeMessageTest.ADDRESS, LargeMessageTest.ADDRESS, true);
+
+ ClientProducer producer = session.createProducer(LargeMessageTest.ADDRESS);
+
+ Message clientFile = session.createMessage(true);
+ for (int i = 0 ; i < messageSize; i++)
+ {
+ clientFile.getBodyBuffer().writeByte(getSamplebyte(i));
+ }
+
+
+ producer.send(clientFile);
+
+ if (transacted)
+ {
+ session.commit();
+ }
+
+ session.start();
+
+ ClientConsumer consumer = session.createConsumer(LargeMessageTest.ADDRESS);
+ ClientMessage msg1 = consumer.receive(5000);
+ assertNotNull(msg1);
+
+ Assert.assertNotNull(msg1);
+
+ for (int i = 0 ; i < messageSize; i++)
+ {
+ //System.out.print(msg1.getBodyBuffer().readByte() + " ");
+ //if (i % 100 == 0) System.out.println();
+ assertEquals("position = " + i, getSamplebyte(i), msg1.getBodyBuffer().readByte());
+ }
+
+ msg1.acknowledge();
+
+ consumer.close();
+
+
+ if (transacted)
+ {
+ session.commit();
+ }
+
+
+ session.close();
+
+ validateNoFilesOnLargeDir();
+ }
+ finally
+ {
+ try
+ {
+ server.stop();
+ }
+ catch (Throwable ignored)
+ {
+ }
+
+ try
+ {
+ session.close();
+ }
+ catch (Throwable ignored)
+ {
+ }
+ }
+ }
+
public void testDLALargeMessage() throws Exception
{
final int messageSize = (int)(3.5 * HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE);
@@ -799,11 +902,95 @@
Assert.assertEquals(messageSize, msg2.getBodySize());
- for (int i = 0; i < messageSize; i++)
+ compareString(messageSize, msg2);
+
+ session.close();
+
+ validateNoFilesOnLargeDir();
+ }
+ finally
+ {
+ try
{
- Assert.assertEquals(UnitTestCase.getSamplebyte(i), msg2.getBodyBuffer().readByte());
+ server.stop();
}
+ catch (Throwable ignored)
+ {
+ }
+ try
+ {
+ session.close();
+ }
+ catch (Throwable ignored)
+ {
+ }
+ }
+ }
+
+ public void testResendCachedSmallStreamMessage() throws Exception
+ {
+ internalTestResendMessage(50000);
+ }
+
+ public void testResendCachedLargeStreamMessage() throws Exception
+ {
+ internalTestCachedResendMessage(150 * 1024);
+ }
+
+ public void internalTestCachedResendMessage(final long messageSize) throws Exception
+ {
+ ClientSession session = null;
+
+ try
+ {
+ server = createServer(true, isNetty());
+
+ server.start();
+
+ ClientSessionFactory sf = createFactory(isNetty());
+
+ sf.setMinLargeMessageSize(111);
+
+ sf.setCacheLargeMessagesClient(true);
+
+ session = sf.createSession(false, false, false);
+
+ session.createQueue(LargeMessageTest.ADDRESS, LargeMessageTest.ADDRESS, true);
+
+ ClientProducer producer = session.createProducer(LargeMessageTest.ADDRESS);
+
+ Message originalMsg = createLargeClientMessage(session, messageSize, false);
+
+ producer.send(originalMsg);
+
+ session.commit();
+
+ ClientConsumer consumer = session.createConsumer(LargeMessageTest.ADDRESS);
+
+ session.start();
+
+ ClientMessage msgReceived = consumer.receive(10000);
+ msgReceived.acknowledge();
+
+ session.commit();
+
+ compareString(messageSize, msgReceived);
+
+ msgReceived.getBodyBuffer().readerIndex(0);
+
+ producer.send(msgReceived);
+
+ session.commit();
+
+ ClientMessage msgReceived2 = consumer.receive(10000);
+
+ msgReceived2.acknowledge();
+
+ compareString(messageSize, msgReceived2);
+
+ session.commit();
+
session.close();
validateNoFilesOnLargeDir();
@@ -828,6 +1015,19 @@
}
}
+ /**
+ * @param messageSize
+ * @param msg2
+ */
+ private void compareString(final long messageSize, ClientMessage msg)
+ {
+ assertNotNull(msg);
+ for (long i = 0; i < messageSize; i++)
+ {
+ Assert.assertEquals("position " + i, UnitTestCase.getSamplebyte(i), msg.getBodyBuffer().readByte());
+ }
+ }
+
public void testFilePersistenceOneHugeMessage() throws Exception
{
testChunks(false,
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java 2010-04-26 16:25:35 UTC (rev 9170)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/client/TextMessageTest.java 2010-04-27 00:41:55 UTC (rev 9171)
@@ -239,7 +239,7 @@
HornetQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD,
HornetQClient.DEFAULT_CONNECTION_TTL,
callTimeout,
- HornetQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT,
+ true,
HornetQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE,
HornetQClient.DEFAULT_CONSUMER_WINDOW_SIZE,
HornetQClient.DEFAULT_CONSUMER_MAX_RATE,
Modified: trunk/tests/src/org/hornetq/tests/integration/jms/largemessage/JMSLargeMessageTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/largemessage/JMSLargeMessageTest.java 2010-04-26 16:25:35 UTC (rev 9170)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/largemessage/JMSLargeMessageTest.java 2010-04-27 00:41:55 UTC (rev 9171)
@@ -33,6 +33,8 @@
import org.hornetq.tests.util.JMSTestBase;
import org.hornetq.tests.util.UnitTestCase;
+import org.hornetq.utils.UUID;
+import org.hornetq.utils.UUIDGenerator;
/**
*
@@ -338,6 +340,68 @@
}
+
+ public void testHugeString() throws Exception
+ {
+ int msgSize = 1024 * 1024;
+
+ Connection conn = null;
+
+ try
+ {
+ conn = cf.createConnection();
+
+ Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageProducer prod = session.createProducer(queue1);
+
+ TextMessage m = session.createTextMessage();
+
+ StringBuffer buffer = new StringBuffer();
+ while(buffer.length() < msgSize)
+ {
+ buffer.append(UUIDGenerator.getInstance().generateStringUUID());
+ }
+
+ final String originalString = buffer.toString();
+
+ m.setText(originalString);
+
+ buffer = null;
+
+ prod.send(m);
+
+ conn.close();
+
+ validateNoFilesOnLargeDir(1);
+
+ conn = cf.createConnection();
+
+ session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageConsumer cons = session.createConsumer(queue1);
+
+ conn.start();
+
+ TextMessage rm = (TextMessage)cons.receive(10000);
+ Assert.assertNotNull(rm);
+
+ String str = rm.getText();
+ assertEquals(originalString, str);
+
+ }
+ finally
+ {
+ if (conn != null)
+ {
+ conn.close();
+ }
+ }
+
+ validateNoFilesOnLargeDir(0);
+
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified: trunk/tests/src/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java 2010-04-26 16:25:35 UTC (rev 9170)
+++ trunk/tests/src/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java 2010-04-27 00:41:55 UTC (rev 9171)
@@ -56,12 +56,29 @@
// Attributes ----------------------------------------------------
+ static int tmpFileCounter = 0;
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
// Public --------------------------------------------------------
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ tmpFileCounter++;
+
+ File tmp = new File(getTestDir());
+ tmp.mkdirs();
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
// Test Simple getBytes
public void testGetBytes() throws Exception
{
@@ -193,7 +210,7 @@
private File getTestFile()
{
- return new File(getTestDir(), "temp.file");
+ return new File(getTestDir(), "temp." + tmpFileCounter + ".file");
}
public void testReadDataOverCached() throws Exception
@@ -298,7 +315,49 @@
Assert.assertEquals(i, bytes[i]);
}
}
+
+ public void testSplitBufferOnFile() throws Exception
+ {
+ LargeMessageBufferImpl outBuffer = new LargeMessageBufferImpl(new FakeConsumerInternal(),
+ 1024 * 1024,
+ 1,
+ getTestFile(),
+ 1024);
+ try
+ {
+ long count = 0;
+ for (int i = 0; i < 10; i++)
+ {
+ byte buffer[] = new byte[10240];
+ for (int j = 0; j < 10240; j++)
+ {
+ buffer[j] = getSamplebyte(count++);
+ }
+ outBuffer.addPacket(new FakePacket(1, buffer, true, false));
+ }
+
+ outBuffer.readerIndex(0);
+
+ for (int i = 0; i < 10240 * 10; i++)
+ {
+ assertEquals("position " + i, getSamplebyte(i), outBuffer.readByte());
+ }
+
+ outBuffer.readerIndex(0);
+
+ for (int i = 0; i < 10240 * 10; i++)
+ {
+ assertEquals("position " + i, getSamplebyte(i), outBuffer.readByte());
+ }
+ }
+ finally
+ {
+ outBuffer.close();
+ }
+
+ }
+
public void testStreamData() throws Exception
{
final LargeMessageBufferImpl outBuffer = new LargeMessageBufferImpl(new FakeConsumerInternal(),
@@ -727,7 +786,7 @@
public void stop(boolean waitForOnMessage) throws HornetQException
{
- //To change body of implemented methods use File | Settings | File Templates.
+ // To change body of implemented methods use File | Settings | File Templates.
}
public SessionQueueQueryResponseMessage getQueueInfo()
14 years
JBoss hornetq SVN: r9170 - in trunk: src/config and 3 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-04-26 12:25:35 -0400 (Mon, 26 Apr 2010)
New Revision: 9170
Added:
trunk/src/config/jboss-as-6/
trunk/src/config/jboss-as-6/clustered/
trunk/src/config/jboss-as-6/clustered/hornetq-configuration.xml
trunk/src/config/jboss-as-6/clustered/hornetq-jboss-beans.xml
trunk/src/config/jboss-as-6/clustered/hornetq-jms.xml
trunk/src/config/jboss-as-6/clustered/jms-ds.xml
trunk/src/config/jboss-as-6/non-clustered/
trunk/src/config/jboss-as-6/non-clustered/hornetq-configuration.xml
trunk/src/config/jboss-as-6/non-clustered/hornetq-jboss-beans.xml
trunk/src/config/jboss-as-6/non-clustered/hornetq-jms.xml
trunk/src/config/jboss-as-6/non-clustered/jms-ds.xml
Modified:
trunk/build-hornetq.xml
Log:
added JBoss AS 6 resources
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2010-04-26 15:46:28 UTC (rev 9169)
+++ trunk/build-hornetq.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -888,7 +888,9 @@
<exclude name="**/data"/>
</fileset>
<fileset dir="${src.config.dir}">
- <include name="jboss-as/**"/>
+ <include name="jboss-as-4/**"/>
+ <include name="jboss-as-5/**"/>
+ <include name="jboss-as-6/**"/>
<include name="ra.xml"/>
<exclude name="**/build.xml"/>
</fileset>
Added: trunk/src/config/jboss-as-6/clustered/hornetq-configuration.xml
===================================================================
--- trunk/src/config/jboss-as-6/clustered/hornetq-configuration.xml (rev 0)
+++ trunk/src/config/jboss-as-6/clustered/hornetq-configuration.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -0,0 +1,119 @@
+<!--
+ ~ 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.
+ -->
+
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <clustered>true</clustered>
+
+ <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+
+ <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+ <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+
+ <journal-min-files>10</journal-min-files>
+
+ <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+ <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </connector>
+
+ <connector name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
+ </connector>
+
+ </connectors>
+
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </acceptor>
+
+ <acceptor name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </acceptor>
+
+ <acceptor name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="server-id" value="0"/>
+ </acceptor>
+
+ </acceptors>
+
+ <broadcast-groups>
+ <broadcast-group name="bg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <broadcast-period>5000</broadcast-period>
+ <connector-ref connector-name="netty"/>
+ </broadcast-group>
+ </broadcast-groups>
+
+ <discovery-groups>
+ <discovery-group name="dg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <refresh-timeout>10000</refresh-timeout>
+ </discovery-group>
+ </discovery-groups>
+
+ <cluster-connections>
+ <cluster-connection name="my-cluster">
+ <address>jms</address>
+ <discovery-group-ref discovery-group-name="dg-group1"/>
+ </cluster-connection>
+ </cluster-connections>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
+
+</configuration>
Added: trunk/src/config/jboss-as-6/clustered/hornetq-jboss-beans.xml
===================================================================
--- trunk/src/config/jboss-as-6/clustered/hornetq-jboss-beans.xml (rev 0)
+++ trunk/src/config/jboss-as-6/clustered/hornetq-jboss-beans.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="org.jboss.mx.util.MBeanServerLocator"
+ factoryMethod="locateJBoss"/>
+ </bean>
+
+ <!-- The core configuration -->
+ <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration">
+ <property name="configurationUrl">${jboss.server.home.url}/deploy/hornetq/hornetq-configuration.xml</property>
+ </bean>
+
+ <!-- The security manager -->
+ <bean name="HornetQSecurityManager" class="org.hornetq.integration.jboss.security.JBossASSecurityManager">
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ <depends>JBossSecurityJNDIContextEstablishment</depends>
+ </bean>
+
+ <!-- The core server -->
+ <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="Configuration"/>
+ </parameter>
+ <parameter>
+ <inject bean="MBeanServer"/>
+ </parameter>
+ <parameter>
+ <inject bean="HornetQSecurityManager"/>
+ </parameter>
+ </constructor>
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="HornetQServer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
+</deployment>
Added: trunk/src/config/jboss-as-6/clustered/hornetq-jms.xml
===================================================================
--- trunk/src/config/jboss-as-6/clustered/hornetq-jms.xml (rev 0)
+++ trunk/src/config/jboss-as-6/clustered/hornetq-jms.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -0,0 +1,43 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+ <connection-factory name="NettyConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="/ConnectionFactory"/>
+ <entry name="/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="NettyThroughputConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty-throughput"/>
+ </connectors>
+ <entries>
+ <entry name="/ThroughputConnectionFactory"/>
+ <entry name="/XAThroughputConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="InVMConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ <entry name="java:/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="DLQ">
+ <entry name="/queue/DLQ"/>
+ </queue>
+
+ <queue name="ExpiryQueue">
+ <entry name="/queue/ExpiryQueue"/>
+ </queue>
+
+</configuration>
\ No newline at end of file
Added: trunk/src/config/jboss-as-6/clustered/jms-ds.xml
===================================================================
--- trunk/src/config/jboss-as-6/clustered/jms-ds.xml (rev 0)
+++ trunk/src/config/jboss-as-6/clustered/jms-ds.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -0,0 +1,26 @@
+<connection-factories>
+ <!--
+ JMS Stuff
+ -->
+
+ <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
+ <attribute name="ProviderName">DefaultJMSProvider</attribute>
+ <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+ <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+ </mbean>
+ <!--
+ JMS XA Resource adapter, use this to get transacted JMS in beans
+ -->
+ <tx-connection-factory>
+ <jndi-name>JmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>jms-ra.rar</rar-name>
+ <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+ <max-pool-size>20</max-pool-size>
+ <security-domain-and-application>JmsXARealm</security-domain-and-application>
+ </tx-connection-factory>
+</connection-factories>
\ No newline at end of file
Added: trunk/src/config/jboss-as-6/non-clustered/hornetq-configuration.xml
===================================================================
--- trunk/src/config/jboss-as-6/non-clustered/hornetq-configuration.xml (rev 0)
+++ trunk/src/config/jboss-as-6/non-clustered/hornetq-configuration.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -0,0 +1,93 @@
+<!--
+ ~ 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.
+ -->
+
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+
+ <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+ <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+
+ <journal-min-files>10</journal-min-files>
+
+ <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+ <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </connector>
+
+ <connector name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
+ </connector>
+
+ </connectors>
+
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </acceptor>
+
+ <acceptor name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </acceptor>
+
+ <acceptor name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="server-id" value="0"/>
+ </acceptor>
+
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
+
+</configuration>
Added: trunk/src/config/jboss-as-6/non-clustered/hornetq-jboss-beans.xml
===================================================================
--- trunk/src/config/jboss-as-6/non-clustered/hornetq-jboss-beans.xml (rev 0)
+++ trunk/src/config/jboss-as-6/non-clustered/hornetq-jboss-beans.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="org.jboss.mx.util.MBeanServerLocator"
+ factoryMethod="locateJBoss"/>
+ </bean>
+
+ <!-- The core configuration -->
+ <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration">
+ <property name="configurationUrl">${jboss.server.home.url}/deploy/hornetq/hornetq-configuration.xml</property>
+ </bean>
+
+ <!-- The security manager -->
+ <bean name="HornetQSecurityManager" class="org.hornetq.integration.jboss.security.JBossASSecurityManager">
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ <depends>JBossSecurityJNDIContextEstablishment</depends>
+ </bean>
+
+ <!-- The core server -->
+ <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="Configuration"/>
+ </parameter>
+ <parameter>
+ <inject bean="MBeanServer"/>
+ </parameter>
+ <parameter>
+ <inject bean="HornetQSecurityManager"/>
+ </parameter>
+ </constructor>
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="HornetQServer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
+</deployment>
Added: trunk/src/config/jboss-as-6/non-clustered/hornetq-jms.xml
===================================================================
--- trunk/src/config/jboss-as-6/non-clustered/hornetq-jms.xml (rev 0)
+++ trunk/src/config/jboss-as-6/non-clustered/hornetq-jms.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -0,0 +1,43 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+ <connection-factory name="NettyConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="/ConnectionFactory"/>
+ <entry name="/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="NettyThroughputConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty-throughput"/>
+ </connectors>
+ <entries>
+ <entry name="/ThroughputConnectionFactory"/>
+ <entry name="/XAThroughputConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="InVMConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ <entry name="java:/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="DLQ">
+ <entry name="/queue/DLQ"/>
+ </queue>
+
+ <queue name="ExpiryQueue">
+ <entry name="/queue/ExpiryQueue"/>
+ </queue>
+
+</configuration>
\ No newline at end of file
Added: trunk/src/config/jboss-as-6/non-clustered/jms-ds.xml
===================================================================
--- trunk/src/config/jboss-as-6/non-clustered/jms-ds.xml (rev 0)
+++ trunk/src/config/jboss-as-6/non-clustered/jms-ds.xml 2010-04-26 16:25:35 UTC (rev 9170)
@@ -0,0 +1,26 @@
+<connection-factories>
+ <!--
+ JMS Stuff
+ -->
+
+ <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
+ <attribute name="ProviderName">DefaultJMSProvider</attribute>
+ <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+ <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+ </mbean>
+ <!--
+ JMS XA Resource adapter, use this to get transacted JMS in beans
+ -->
+ <tx-connection-factory>
+ <jndi-name>JmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>jms-ra.rar</rar-name>
+ <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+ <max-pool-size>20</max-pool-size>
+ <security-domain-and-application>JmsXARealm</security-domain-and-application>
+ </tx-connection-factory>
+</connection-factories>
\ No newline at end of file
14 years
JBoss hornetq SVN: r9169 - in trunk: tests/src/org/hornetq/tests/integration/client and 1 other directory.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-04-26 11:46:28 -0400 (Mon, 26 Apr 2010)
New Revision: 9169
Modified:
trunk/src/main/org/hornetq/ra/inflow/HornetQMessageHandler.java
trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
Log:
fixed ra to rollback with last message as delivered
Modified: trunk/src/main/org/hornetq/ra/inflow/HornetQMessageHandler.java
===================================================================
--- trunk/src/main/org/hornetq/ra/inflow/HornetQMessageHandler.java 2010-04-26 14:23:46 UTC (rev 9168)
+++ trunk/src/main/org/hornetq/ra/inflow/HornetQMessageHandler.java 2010-04-26 15:46:28 UTC (rev 9169)
@@ -291,7 +291,7 @@
{
try
{
- session.rollback();
+ session.rollback(true);
}
catch (HornetQException e1)
{
Modified: trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java 2010-04-26 14:23:46 UTC (rev 9168)
+++ trunk/tests/src/org/hornetq/tests/integration/client/DeadLetterAddressTest.java 2010-04-26 15:46:28 UTC (rev 9169)
@@ -14,6 +14,8 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
import junit.framework.Assert;
@@ -72,6 +74,98 @@
Assert.assertEquals(m.getBodyBuffer().readString(), "heyho!");
}
+ public void testBasicSend2times() throws Exception
+ {
+ SimpleString dla = new SimpleString("DLA");
+ SimpleString qName = new SimpleString("q1");
+ AddressSettings addressSettings = new AddressSettings();
+ addressSettings.setMaxDeliveryAttempts(2);
+ addressSettings.setDeadLetterAddress(dla);
+ server.getAddressSettingsRepository().addMatch(qName.toString(), addressSettings);
+ SimpleString dlq = new SimpleString("DLQ1");
+ clientSession.createQueue(dla, dlq, null, false);
+ clientSession.createQueue(qName, qName, null, false);
+ ClientProducer producer = clientSession.createProducer(qName);
+ producer.send(createTextMessage("heyho!", clientSession));
+ clientSession.start();
+ ClientConsumer clientConsumer = clientSession.createConsumer(qName);
+ ClientMessage m = clientConsumer.receive(5000);
+ m.acknowledge();
+ Assert.assertNotNull(m);
+ Assert.assertEquals(m.getBodyBuffer().readString(), "heyho!");
+ // force a cancel
+ clientSession.rollback();
+ clientSession.start();
+ m = clientConsumer.receive(5000);
+ m.acknowledge();
+ Assert.assertNotNull(m);
+ Assert.assertEquals(m.getBodyBuffer().readString(), "heyho!");
+ // force a cancel
+ clientSession.rollback();
+ m = clientConsumer.receiveImmediate();
+ Assert.assertNull(m);
+ clientConsumer.close();
+ clientConsumer = clientSession.createConsumer(dlq);
+ m = clientConsumer.receive(5000);
+ Assert.assertNotNull(m);
+ Assert.assertEquals(m.getBodyBuffer().readString(), "heyho!");
+ }
+
+ public void testReceiveWithListeners() throws Exception
+ {
+ SimpleString dla = new SimpleString("DLA");
+ SimpleString qName = new SimpleString("q1");
+ AddressSettings addressSettings = new AddressSettings();
+ addressSettings.setMaxDeliveryAttempts(2);
+ addressSettings.setDeadLetterAddress(dla);
+ server.getAddressSettingsRepository().addMatch(qName.toString(), addressSettings);
+ SimpleString dlq = new SimpleString("DLQ1");
+ clientSession.createQueue(dla, dlq, null, false);
+ clientSession.createQueue(qName, qName, null, false);
+ ClientProducer producer = clientSession.createProducer(qName);
+ producer.send(createTextMessage("heyho!", clientSession));
+ ClientConsumer clientConsumer = clientSession.createConsumer(qName);
+ final CountDownLatch latch = new CountDownLatch(2);
+ TestHandler handler = new TestHandler(latch, clientSession);
+ clientConsumer.setMessageHandler(handler);
+ clientSession.start();
+ assertTrue(latch.await(5, TimeUnit.SECONDS));
+ assertEquals(handler.count, 2);
+ clientConsumer = clientSession.createConsumer(dlq);
+ Message m = clientConsumer.receiveImmediate();
+ Assert.assertNotNull(m);
+ Assert.assertEquals(m.getBodyBuffer().readString(), "heyho!");
+ }
+
+ class TestHandler implements MessageHandler
+ {
+ private CountDownLatch latch;
+ int count = 0;
+
+ private ClientSession clientSession;
+
+ public TestHandler(CountDownLatch latch, ClientSession clientSession)
+ {
+ this.latch = latch;
+ this.clientSession = clientSession;
+ }
+
+ public void onMessage(ClientMessage message)
+ {
+ count++;
+ latch.countDown();
+ try
+ {
+ clientSession.rollback(true);
+ }
+ catch (HornetQException e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ throw new RuntimeException();
+ }
+ }
+
public void testBasicSendToMultipleQueues() throws Exception
{
SimpleString dla = new SimpleString("DLA");
14 years
JBoss hornetq SVN: r9168 - trunk.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-04-26 10:23:46 -0400 (Mon, 26 Apr 2010)
New Revision: 9168
Modified:
trunk/build-hornetq.xml
Log:
updated build file
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2010-04-26 14:18:05 UTC (rev 9167)
+++ trunk/build-hornetq.xml 2010-04-26 14:23:46 UTC (rev 9168)
@@ -89,7 +89,7 @@
<property name="build.bootstrap.classes.dir" value="${build.dir}/classes/bootstrap"/>
<property name="build.logging.classes.dir" value="${build.dir}/classes/logging"/>
<property name="build.ra.classes.dir" value="${build.dir}/classes/ra"/>
- <property name="build.jars.dir" value="${build.dir}/jars"/>
+ <property name="build.jars.dir" value="${build.dir}/jars"/>
<property name="build.src.dir" value="${build.dir}/src"/>
<property name="src.dir" value="src"/>
<property name="src.main.dir" value="${src.dir}/main"/>
@@ -98,8 +98,10 @@
<property name="src.config.standalone.clustered.dir" value="${src.dir}/config/stand-alone/clustered"/>
<property name="src.config.trunk.non-clustered.dir" value="${src.dir}/config/trunk/non-clustered"/>
<property name="src.config.trunk.clustered.dir" value="${src.dir}/config/trunk/clustered"/>
- <property name="src.config.jbossas.non-clustered.dir" value="${src.dir}/config/jboss-as/non-clustered"/>
- <property name="src.config.jbossas.clustered.dir" value="${src.dir}/config/jboss-as/clustered"/>
+ <property name="src.config.jbossas4.non-clustered.dir" value="${src.dir}/config/jboss-as-4/non-clustered"/>
+ <property name="src.config.jbossas4.clustered.dir" value="${src.dir}/config/jboss-as-4/clustered"/>
+ <property name="src.config.jbossas5.non-clustered.dir" value="${src.dir}/config/jboss-as-5/non-clustered"/>
+ <property name="src.config.jbossas5.clustered.dir" value="${src.dir}/config/jboss-as-5/clustered"/>
<property name="src.config.service.dir" value="${src.dir}/config/service"/>
<property name="src.schema.dir" value="${src.config.dir}/common/schema"/>
<property name="src.bin.dir" value="${src.dir}/bin"/>
@@ -129,12 +131,12 @@
<property name="build.distro.tools.dir" value="${build.distro.dir}/tools"/>
<property name="artifacts.dir" value="${build.dir}/artifacts"/>
- <!--default clustering server settings-->
+ <!--default clustering server settings-->
<property name="hornetq.remoting.netty.port" value="5445"/>
<property name="jnp.port" value="1099"/>
<property name="jnp.rmiPort" value="1098"/>
<property name="hornetq.data.dir" value="data1"/>
-
+
<!-- ======================================================================================== -->
<!-- Thirdparty Dependency -->
<!-- ======================================================================================== -->
@@ -152,7 +154,7 @@
Setting "nodownload" to true inhibits downloading of up-to-date dependencies.
-->
<property name="nodownload" value="false"/>
-
+
<!-- ======================================================================================== -->
<!-- Test properties -->
<!-- ======================================================================================== -->
@@ -184,7 +186,7 @@
<path id="core.compilation.classpath">
<path refid="org.jboss.netty.classpath"/>
</path>
-
+
<path id="jms.compilation.classpath">
<path location="${build.core.classes.dir}"/>
<path refid="org.jboss.netty.classpath"/>
@@ -200,7 +202,7 @@
<path refid="org.jboss.integration.classpath"/>
<path refid="org.jboss.javaee.classpath"/>
</path>
-
+
<path id="jboss.service.compilation.classpath">
<path refid="org.jboss.javaee.classpath"/>
<path location="${build.core.classes.dir}"/>
@@ -256,7 +258,7 @@
<path refid="org.jboss.naming.classpath"/>
<path refid="org.jboss.logging.classpath"/>
</path>
-
+
<path id="findbugs.classpath">
<path refid="jms.compilation.classpath"/>
<path location="${build.jars.dir}/jboss-${module.name}.jar"/>
@@ -297,7 +299,7 @@
<path refid="test.compilation.classpath"/>
<path refid="apache.xerces.classpath"/>
</path>
-
+
<path id="jms.test.execution.classpath">
<pathelement location="${src.schema.dir}"/>
<pathelement location="${test.jms.dir}/config"/>
@@ -316,7 +318,7 @@
<pathelement location="${test.dir}/config"/>
<pathelement location="${src.config.dir}/common"/>
</path>
-
+
<path id="joram.test.execution.classpath">
<pathelement location="${test.joram.classes.dir}"/>
<pathelement location="${test.joram.config.dir}"/>
@@ -347,7 +349,7 @@
<delete dir="${test.output.dir}" quiet="true"/>
<delete dir="${test.jms.build.dir}" quiet="true"/>
<delete dir="${test.joram.build.dir}" quiet="true"/>
- <delete dir="${thirdparty.dir}" quiet="true"/>
+ <delete dir="${thirdparty.dir}" quiet="true"/>
<delete quiet="true">
<fileset dir="${logs.dir}" includes="*"/>
</delete>
@@ -367,8 +369,8 @@
<mkdir dir="${build.jars.dir}"/>
<mkdir dir="${build.src.dir}"/>
</target>
-
-
+
+
<target name="createthirdparty" unless="inhibit.downloads" depends="check.inhibit.downloads">
<ant antfile="build-thirdparty.xml" target="maven-install"/>
</target>
@@ -387,7 +389,7 @@
<!-- ================================= -->
<!-- Compilation targets -->
<!-- ================================= -->
-
+
<target name="compile" depends="compile-jms"/>
<target name="compile-core" depends="init">
@@ -473,7 +475,7 @@
<classpath refid="jboss.integration.compilation.classpath"/>
</javac>
</target>
-
+
<!-- author: Lucas Amador -->
<target name="compile-jboss-service" depends="compile-core">
<javac destdir="${build.service.classes.dir}"
@@ -493,8 +495,6 @@
<include name="org/hornetq/service/**/*.java"/>
<classpath refid="jboss.service.compilation.classpath"/>
</javac>
- <copy file="${src.config.service.dir}/jboss-service.xml"
- tofile="${build.service.classes.dir}/META-INF/jboss-service.xml" overwrite="true" />
</target>
<target name="compile-bootstrap" depends="compile-core">
@@ -563,14 +563,14 @@
<arg line="bootstrap"/>
</exec>
</target>
-
+
<target name="validate-configuration">
<antcall target="-validate-configuration">
<param name="conf.dir" value="${src.config.standalone.non-clustered.dir}"/>
</antcall>
<!-- user configuration is only for standalone -->
<schemavalidate file="${src.config.standalone.non-clustered.dir}/hornetq-users.xml">
- <schema namespace="urn:hornetq"
+ <schema namespace="urn:hornetq"
file="${src.schema.dir}/hornetq-users.xsd"/>
</schemavalidate>
@@ -579,31 +579,38 @@
</antcall>
<!-- user configuration is only for standalone -->
<schemavalidate file="${src.config.standalone.clustered.dir}/hornetq-users.xml">
- <schema namespace="urn:hornetq"
+ <schema namespace="urn:hornetq"
file="${src.schema.dir}/hornetq-users.xsd"/>
</schemavalidate>
-
- <!-- AS 5 configuration validation -->
+
+ <!-- AS 4 configuration validation -->
<antcall target="-validate-configuration">
- <param name="conf.dir" value="${src.config.jbossas.non-clustered.dir}"/>
+ <param name="conf.dir" value="${src.config.jbossas4.non-clustered.dir}"/>
</antcall>
<antcall target="-validate-configuration">
- <param name="conf.dir" value="${src.config.jbossas.clustered.dir}"/>
+ <param name="conf.dir" value="${src.config.jbossas4.clustered.dir}"/>
</antcall>
+ <!-- AS 5 configuration validation -->
+ <antcall target="-validate-configuration">
+ <param name="conf.dir" value="${src.config.jbossas5.non-clustered.dir}"/>
+ </antcall>
+ <antcall target="-validate-configuration">
+ <param name="conf.dir" value="${src.config.jbossas5.clustered.dir}"/>
+ </antcall>
</target>
-
+
<target name="-validate-configuration">
<echo>validating configuration from ${conf.dir}</echo>
<schemavalidate file="${conf.dir}/hornetq-configuration.xml">
- <schema namespace="urn:hornetq"
+ <schema namespace="urn:hornetq"
file="${src.schema.dir}/hornetq-configuration.xsd"/>
</schemavalidate>
<schemavalidate file="${conf.dir}/hornetq-jms.xml">
- <schema namespace="urn:hornetq"
+ <schema namespace="urn:hornetq"
file="${src.schema.dir}/hornetq-jms.xsd"/>
</schemavalidate>
</target>
-
+
<!-- ======================================================================================== -->
<!-- Jar Targets -->
<!-- ======================================================================================== -->
@@ -615,7 +622,7 @@
<target name="jar"
depends="jar-core, jar-core-client, jar-jms, jar-jms-client, jar-jboss-integration, jar-jboss-service, jar-bootstrap, jar-logging, jar-ra, jar-mc, jar-jnp-client, jar-resources, sources-jar">
</target>
-
+
<target name="jar-jnp-client" depends="init">
<jar jarfile="${build.jars.dir}/${jnp.client.jar.name}">
<zipfileset src="${org.jboss.naming.lib}/jnpserver.jar">
@@ -628,7 +635,7 @@
</zipfileset>
</jar>
</target>
-
+
<target name="jar-mc" depends="init">
<jar jarfile="${build.jars.dir}/${mc.jar.name}">
<zipfileset src="./thirdparty/org/jboss/logging/lib/jboss-logging-spi.jar"/>
@@ -639,9 +646,9 @@
<zipfileset src="./thirdparty/org/jboss/lib/jboss-mdr.jar"/>
<zipfileset src="./thirdparty/org/jboss/lib/jbossxb.jar"/>
<zipfileset src="./thirdparty/sun-jaxb/lib/jaxb-api.jar"/>
- </jar>
- </target>
-
+ </jar>
+ </target>
+
<target name="jar-core" depends="compile-core">
<jar jarfile="${build.jars.dir}/${core.jar.name}">
@@ -657,7 +664,7 @@
</jar>
</target>
-
+
<target name="jar-core-sources">
<jar jarfile="${build.jars.dir}/${core.sources.jar.name}">
<fileset dir="${src.main.dir}">
@@ -700,19 +707,19 @@
</fileset>
</jar>
</target>
-
+
<target name="jar-jms-client" depends="compile-jms">
-
- <jar jarfile="${build.jars.dir}/${jms.client.jar.name}">
+
+ <jar jarfile="${build.jars.dir}/${jms.client.jar.name}">
<fileset dir="${build.jms.classes.dir}" includes="org/hornetq/api/jms/**/*.class"/>
<fileset dir="${build.jms.classes.dir}" includes="org/hornetq/jms/client/*.class"/>
<fileset dir="${build.jms.classes.dir}" includes="org/hornetq/jms/referenceable/*.class"/>
</jar>
-
+
</target>
<target name="jar-jms-client-sources">
- <jar jarfile="${build.jars.dir}/${jms.client.sources.jar.name}">
+ <jar jarfile="${build.jars.dir}/${jms.client.sources.jar.name}">
<fileset dir="${src.main.dir}">
<include name="org/hornetq/api/jms/**/*.*"/>
<include name="org/hornetq/jms/client/**/*.*"/>
@@ -720,7 +727,7 @@
</fileset>
</jar>
</target>
-
+
<target name="jar-jboss-integration" depends="compile-jboss-integration">
<jar jarfile="${build.jars.dir}/${jboss.integration.jar.name}">
@@ -728,7 +735,7 @@
</jar>
</target>
-
+
<target name="jar-jboss-integration-sources">
<jar jarfile="${build.jars.dir}/${jboss.integration.sources.jar.name}">
<fileset dir="${src.main.dir}">
@@ -736,7 +743,7 @@
</fileset>
</jar>
</target>
-
+
<!-- author: Lucas Amador -->
<target name="jar-jboss-service" depends="compile-jboss-service">
@@ -753,7 +760,7 @@
</fileset>
</jar>
</target>
-
+
<target name="jar-bootstrap" depends="compile-bootstrap">
<jar jarfile="${build.jars.dir}/${bootstrap.jar.name}">
@@ -769,7 +776,7 @@
</fileset>
</jar>
</target>
-
+
<target name="jar-logging" depends="compile-logging">
<jar jarfile="${build.jars.dir}/${logging.jar.name}">
@@ -785,7 +792,7 @@
</fileset>
</jar>
</target>
-
+
<target name="jar-core-client" depends="compile-core">
<jar jarfile="${build.jars.dir}/${core.client.jar.name}">
<fileset dir="${build.core.classes.dir}">
@@ -810,7 +817,7 @@
<include name="org/hornetq/spi/core/logging/*.class"/>
<include name="org/hornetq/spi/core/protocol/*.class"/>
<include name="org/hornetq/spi/core/remoting/*.class"/>
-
+
<!-- required by SessionSendMessage -->
<include name="org/hornetq/core/server/ServerMessage.class"/>
<include name="org/hornetq/core/journal/EncodingSupport.class"/>
@@ -843,14 +850,14 @@
<include name="org/hornetq/spi/core/logging/*.*"/>
<include name="org/hornetq/spi/core/protocol/*.*"/>
<include name="org/hornetq/spi/core/remoting/*.*"/>
-
+
<!-- required by SessionSendMessage -->
<include name="org/hornetq/core/server/ServerMessage.java"/>
<include name="org/hornetq/core/journal/EncodingSupport.java"/>
</fileset>
</jar>
</target>
-
+
<target name="jar-ra" depends="jar-core-client, jar-jms-client, compile-ra">
<jar jarfile="${build.jars.dir}/${ra.jar.name}">
<fileset dir="${build.ra.classes.dir}">
@@ -905,13 +912,13 @@
</fileset>
</jar>
</target>
-
+
<!-- ======================================================================================== -->
<!-- Distribution targets -->
<!-- ======================================================================================== -->
<target name="bin-distro" depends="createthirdparty, jar, jar-core-client, jar-jms-client, validate-configuration">
-
+
<mkdir dir="${build.distro.dir}"/>
<mkdir dir="${build.distro.lib.dir}"/>
<mkdir dir="${build.distro.config.dir}"/>
@@ -947,7 +954,8 @@
<include name="jndi.properties"/>
<include name="logging.properties"/>
<include name="stand-alone/**"/>
- <include name="jboss-as/**"/>
+ <include name="jboss-as-4/**"/>
+ <include name="jboss-as-5/**"/>
<exclude name="common/hornetq-version.properties" />
<exclude name="*examples-ant.properties"/>
<exclude name="trunk"/>
@@ -974,7 +982,8 @@
<chmod file="${build.distro.bin.dir}/run.sh" perm="ugo+rx"/>
<chmod file="${build.distro.bin.dir}/stop.sh" perm="ugo+rx"/>
<chmod file="${build.distro.bin.dir}/build.sh" perm="ugo+rx"/>
- <chmod file="${build.distro.config.dir}/jboss-as/build.sh" perm="ugo+rx"/>
+ <chmod file="${build.distro.config.dir}/jboss-as-4/build.sh" perm="ugo+rx"/>
+ <chmod file="${build.distro.config.dir}/jboss-as-5/build.sh" perm="ugo+rx"/>
<copy todir="${build.distro.bin.dir}">
<fileset dir="${native.bin.dir}">
<include name="*.so"/>
@@ -988,7 +997,7 @@
</copy>
<antcall target="dist-doc"/>
-
+
<copy todir="${build.distro.licenses.dir}/">
<fileset dir="${licenses.dir}">
<include name="**"/>
@@ -1010,9 +1019,9 @@
</copy>
<chmod perm="ugo+rx" parallel="false" verbose="true">
- <fileset dir="${build.distro.examples.dir}">
- <include name="**/build.sh"/>
- </fileset>
+ <fileset dir="${build.distro.examples.dir}">
+ <include name="**/build.sh"/>
+ </fileset>
</chmod>
<mkdir dir="${build.distro.tools.dir}/ant"/>
@@ -1022,7 +1031,7 @@
<include name="**"/>
</fileset>
</copy>
-
+
<!-- examples-ant.properties allow the examples to be run from the source or from the distribution -->
<!-- by configuring the correct lib/config location -->
<copy tofile="${build.distro.examples.dir}/common/config/ant.properties" file="src/config/examples-ant.properties" overwrite="true" />
@@ -1101,7 +1110,7 @@
</copy>
</target>
-
+
<target name="userdoc">
<ant dir="./docs/user-manual" antfile="build.xml" target="all"/>
<ant dir="./docs/quickstart-guide" antfile="build.xml" target="all"/>
@@ -1109,7 +1118,7 @@
<target name="javadoc">
- <javadoc
+ <javadoc
doclet="org.jboss.apiviz.APIviz"
docletpath="${thirdparty.dir}/org/jboss/apiviz/lib/apiviz.jar"
destdir="${build.api.dir}"
@@ -1147,11 +1156,11 @@
</antcall>
<antcall target="artifact">
- <param name="artifact.name" value="hornetq-jboss-as-integration"/>
+ <param name="artifact.name" value="hornetq-jboss-as-integration"/>
</antcall>
<antcall target="artifact">
- <param name="artifact.name" value="hornetq-logging"/>
+ <param name="artifact.name" value="hornetq-logging"/>
</antcall>
<property name="build.resources.dir" value="${build.dir}/resources"/>
@@ -1170,7 +1179,7 @@
</jar>
<antcall target="artifact">
- <param name="artifact.name" value="hornetq-resources"/>
+ <param name="artifact.name" value="hornetq-resources"/>
</antcall>
</target>
@@ -1239,7 +1248,7 @@
<classpath refid="jms.test.compilation.classpath"/>
</javac>
</target>
-
+
<target name="compile-joram-tests" depends="compile-jms-tests, compile-unit-tests">
<mkdir dir="${test.joram.classes.dir}"/>
<javac target="${javac.target}"
@@ -1269,18 +1278,18 @@
<param name="tests.param" value="**/org/hornetq/tests/integration/**/*${test-mask}.class"/>
</antcall>
</target>
-
+
<target name="failover-tests" depends="jar, compile-unit-tests">
<antcall inheritall="true" inheritrefs="true" target="tests">
<param name="tests.param" value="**/org/hornetq/tests/integration/cluster/failover/**/*${test-mask}.class"/>
</antcall>
</target>
-
+
<target name="distribution-tests" depends="jar, compile-unit-tests">
<antcall inheritall="true" inheritrefs="true" target="tests">
<param name="tests.param" value="**/org/hornetq/tests/integration/cluster/distribution/**/*${test-mask}.class"/>
</antcall>
- </target>
+ </target>
<target name="concurrent-tests" depends="jar, compile-unit-tests">
<antcall inheritall="true" inheritrefs="true" target="tests">
@@ -1337,7 +1346,7 @@
haltonerror="${junit.batchtest.haltonerror}"
failureproperty="tests.failed">
<formatter type="plain" usefile="${junit.formatter.usefile}"/>
- <fileset dir="${test.classes.dir}">
+ <fileset dir="${test.classes.dir}">
<!-- excluded because of https://jira.jboss.org/jira/browse/HORNETQ-65 -->
<exclude name="**/cluster/failover/*StaticClusterWithBackupFailoverTest.class" />
<include name="${tests.param}"/>
@@ -1387,7 +1396,7 @@
haltonfailure="${junit.batchtest.haltonfailure}"
haltonerror="${junit.batchtest.haltonerror}">
<formatter type="plain" usefile="${junit.formatter.usefile}"/>
- <fileset dir="${test.jms.classes.dir}">
+ <fileset dir="${test.jms.classes.dir}">
<include name="**/jms/tests/**/${test-mask}.class"/>
<exclude name="**/jms/tests/XARecoveryTest.class"/>
<exclude name="**/jms/tests/XAResourceRecoveryTest.class"/>
@@ -1398,7 +1407,7 @@
</batchtest>
</junit>
</target>
-
+
<target name="joram-tests" depends="jar, compile-joram-tests">
<echo message=""/>
<echo message="Running JORAM tests, fork=${junit.fork}, junit.batchtest.fork=${junit.batchtest.fork}"/>
@@ -1431,7 +1440,7 @@
</fileset>
</batchtest>
</junit>
- </target>
+ </target>
<target name="stress-tests" depends="jar, compile-unit-tests">
<echo message=""/>
@@ -1453,7 +1462,7 @@
<jvmarg value="-Xmx1024M"/>
<jvmarg value="-Dmodule.output=./"/>
<jvmarg value="-Djava.util.logging.config.file=src/config/trunk/non-clustered/logging.properties"/>
-
+
<jvmarg value="-Djava.library.path=native/bin"/>
<!--<jvmarg line="-Xmx512M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>-->
<!--<jvmarg value="-ea"/>-->
@@ -1464,7 +1473,7 @@
haltonerror="${junit.batchtest.haltonerror}">
<formatter type="plain" usefile="${junit.formatter.usefile}"/>
<fileset dir="${test.classes.dir}">
- <include name="**/org/hornetq/tests/stress/**/*${test-mask}.class"/>
+ <include name="**/org/hornetq/tests/stress/**/*${test-mask}.class"/>
</fileset>
</batchtest>
</junit>
@@ -1571,8 +1580,8 @@
</emma>
</target>
-
+
<target name="findbugs" depends="jar">
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
<findbugs home="${findbugs.home}"
14 years
JBoss hornetq SVN: r9167 - trunk.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-04-26 10:18:05 -0400 (Mon, 26 Apr 2010)
New Revision: 9167
Added:
trunk/build.xml
Log:
added back build file
Added: trunk/build.xml
===================================================================
--- trunk/build.xml (rev 0)
+++ trunk/build.xml 2010-04-26 14:18:05 UTC (rev 9167)
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE project [
+ <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
+ ]>
+<!--
+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.
+ -->
+
+<!-- =========================================================================================== -->
+<!-- -->
+<!-- $Id: build.xml 8606 2009-12-07 14:53:52Z jmesnil $ -->
+<!-- -->
+<!-- =========================================================================================== -->
+
+
+<project name="HornetQ" default="jar">
+
+ <property name="hornetq.run_script" value="false" />
+
+ <fail message="*** Please build by using the build.sh script (or build.bat on Windows) ***">
+ <condition>
+ <not>
+ <equals arg1="${hornetq.run_script}" arg2="true"/>
+ </not>
+ </condition>
+ </fail>
+
+ <!--
+ Setting "external.project" to true makes jbossbuild use the current directory, and not its
+ parent, as project root. DO NOT change this.
+ -->
+
+ <property name="external.project" value="true"/>
+ <!--
+ Setting "nodownload" to true inhibits downloading of up-to-date dependencies.
+ -->
+ <property name="nodownload" value="false"/>
+
+ <target name="createthirdparty" unless="inhibit.downloads" depends="check.inhibit.downloads">
+ <ant antfile="build-thirdparty.xml" target="maven-install"/>
+ </target>
+
+ <target name="check.inhibit.downloads">
+ <condition property="inhibit.downloads">
+
+ <or>
+ <uptodate property="dependencies.current"
+ srcfile="pom.xml"
+ targetfile="./thirdparty/libraries.ent"/>
+ <istrue value="${nodownload}"/>
+ </or>
+ </condition>
+ </target>
+
+ <target name="clean" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="clean"/>
+
+ </target>
+
+ <target name="init" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="init"/>
+ </target>
+
+ <target name="compile" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile"/>
+ </target>
+
+ <target name="compile-core" depends="createthirdparty">
+
+ <ant antfile="build-hornetq.xml" target="compile-core"/>
+ </target>
+
+ <target name="compile-jms" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile-jms"/>
+ </target>
+
+ <target name="compile-transports" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile-transports"/>
+ </target>
+
+ <target name="compile-security" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile-security"/>
+
+ </target>
+
+ <target name="compile-boostrap" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile-bootstrap"/>
+ </target>
+
+ <target name="compile-logging" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile-logging"/>
+ </target>
+
+ <target name="compile-ra" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile-ra"/>
+
+ </target>
+
+ <target name="build-native" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="build-native"/>
+ </target>
+
+ <target name="userdoc">
+ <ant antfile="build-hornetq.xml" target="userdoc"/>
+ </target>
+
+ <target name="javadoc">
+
+ <ant antfile="build-hornetq.xml" target="javadoc"/>
+ </target>
+
+ <target name="validate-configuration">
+ <ant antfile="build-hornetq.xml" target="validate-configuration"/>
+ </target>
+
+ <!-- ======================================================================================== -->
+ <!-- Archival Tasks -->
+ <!-- ======================================================================================== -->
+
+ <target name="jar" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar"/>
+ </target>
+
+ <target name="jar-core" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-core"/>
+ </target>
+
+ <target name="jar-jms" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-jms"/>
+ </target>
+
+
+ <target name="jar-jms-api" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-jms-api"/>
+ </target>
+
+ <target name="jar-jms-client" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-jms-client"/>
+ </target>
+
+ <target name="jar-transports" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-transports"/>
+ </target>
+
+ <target name="jar-jboss-service" depends="createthirdparty">
+
+ <ant antfile="build-hornetq.xml" target="jar-jboss-service"/>
+ </target>
+
+ <target name="jar-security" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-security"/>
+ </target>
+
+ <target name="jar-bootstrap" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-bootstrap"/>
+ </target>
+
+ <target name="jar-logging" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-logging"/>
+
+ </target>
+
+ <target name="jar-core-client" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-core-client"/>
+ </target>
+
+ <target name="jar-ra" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-ra"/>
+ </target>
+
+ <target name="jar-mc" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jar-mc"/>
+
+ </target>
+
+ <!-- ======================================================================================== -->
+ <!-- Distro Tasks -->
+ <!-- ======================================================================================== -->
+ <target name="deploy-jboss" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="deploy-jboss"/>
+ </target>
+
+ <target name="deploy" depends="createthirdparty">
+
+ <ant antfile="build-hornetq.xml" target="deploy"/>
+ </target>
+
+ <target name="build.sar" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="build.sar"/>
+ </target>
+
+ <target name="distro" depends="bin-distro, source-distro" />
+
+ <target name="bin-distro" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="bin-distro"/>
+
+ </target>
+
+ <target name="source-distro" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="source-distro"/>
+ </target>
+
+ <target name="artifacts" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="artifacts"/>
+ </target>
+
+ <!-- test targets -->
+
+
+ <target name="compile-unit-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile-unit-tests"/>
+ </target>
+
+ <target name="compile-jms-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile"/>
+ </target>
+
+ <target name="compile-joram-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile"/>
+ </target>
+
+ <target name="unit-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="unit-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="timing-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="timing-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="integration-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="integration-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+
+ <target name="failover-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="failover-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="distribution-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="distribution-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="concurrent-tests" depends="createthirdparty">
+
+ <ant antfile="build-hornetq.xml" target="concurrent-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="performance-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="performance-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="stress-tests" depends="createthirdparty">
+
+ <ant antfile="build-hornetq.xml" target="stress-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="jms-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="jms-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="joram-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="joram-tests"/>
+
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="all-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="all-tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="hudson-tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="hudson-tests"/>
+
+ </target>
+
+ <target name="dev-tests" depends="createthirdparty">
+ <mkdir dir="./tmp"/>
+ <ant antfile="build-hornetq.xml" target="hudson-tests">
+ <property name="java.io.tmpdir" value="./tmp"/>
+ </ant>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="tests" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="tests"/>
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="compile-reports" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="compile-reports"/>
+ </target>
+
+ <target name="emma" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="emma"/>
+ </target>
+
+ <!--server-->
+
+ <target name="runServer" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="runServer"/>
+ </target>
+
+ <target name="runClusteredServer" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="runClusteredServer"/>
+ </target>
+
+ <target name="debugServer" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="debugServer"/>
+ </target>
+
+ <target name="findbugs" depends="createthirdparty">
+ <ant antfile="build-hornetq.xml" target="findbugs"/>
+
+ </target>
+
+</project>
14 years
JBoss hornetq SVN: r9166 - in trunk: src/config and 6 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2010-04-26 10:08:48 -0400 (Mon, 26 Apr 2010)
New Revision: 9166
Added:
trunk/src/config/jboss-as-4/
trunk/src/config/jboss-as-4/build.bat
trunk/src/config/jboss-as-4/build.sh
trunk/src/config/jboss-as-4/build.xml
trunk/src/config/jboss-as-4/clustered/
trunk/src/config/jboss-as-4/clustered/hornetq-configuration.xml
trunk/src/config/jboss-as-4/clustered/hornetq-jms.xml
trunk/src/config/jboss-as-4/clustered/hornetq-roles.properties
trunk/src/config/jboss-as-4/clustered/hornetq-users.properties
trunk/src/config/jboss-as-4/clustered/jboss-service.xml
trunk/src/config/jboss-as-4/clustered/jms-ds.xml
trunk/src/config/jboss-as-4/clustered/ra.xml
trunk/src/config/jboss-as-4/non-clustered/
trunk/src/config/jboss-as-4/non-clustered/hornetq-configuration.xml
trunk/src/config/jboss-as-4/non-clustered/hornetq-jms.xml
trunk/src/config/jboss-as-4/non-clustered/hornetq-roles.properties
trunk/src/config/jboss-as-4/non-clustered/hornetq-users.properties
trunk/src/config/jboss-as-4/non-clustered/jboss-service.xml
trunk/src/config/jboss-as-4/non-clustered/jms-ds.xml
trunk/src/config/jboss-as-4/non-clustered/login-config.xml
trunk/src/config/jboss-as-4/non-clustered/ra.xml
trunk/src/config/jboss-as-5/
trunk/src/config/jboss-as-5/build.bat
trunk/src/config/jboss-as-5/build.sh
trunk/src/config/jboss-as-5/build.xml
trunk/src/config/jboss-as-5/clustered/
trunk/src/config/jboss-as-5/clustered/hornetq-configuration.xml
trunk/src/config/jboss-as-5/clustered/hornetq-jboss-beans.xml
trunk/src/config/jboss-as-5/clustered/hornetq-jms.xml
trunk/src/config/jboss-as-5/clustered/hornetq-roles.properties
trunk/src/config/jboss-as-5/clustered/hornetq-users.properties
trunk/src/config/jboss-as-5/clustered/jms-ds.xml
trunk/src/config/jboss-as-5/clustered/login-config.xml
trunk/src/config/jboss-as-5/non-clustered/
trunk/src/config/jboss-as-5/non-clustered/hornetq-configuration.xml
trunk/src/config/jboss-as-5/non-clustered/hornetq-jboss-beans.xml
trunk/src/config/jboss-as-5/non-clustered/hornetq-jms.xml
trunk/src/config/jboss-as-5/non-clustered/hornetq-roles.properties
trunk/src/config/jboss-as-5/non-clustered/hornetq-users.properties
trunk/src/config/jboss-as-5/non-clustered/jms-ds.xml
trunk/src/config/jboss-as-5/non-clustered/login-config.xml
Removed:
trunk/build.xml
trunk/src/config/jboss-as/
trunk/src/config/service/
Log:
renamed config directories
Deleted: trunk/build.xml
===================================================================
--- trunk/build.xml 2010-04-26 13:27:05 UTC (rev 9165)
+++ trunk/build.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -1,317 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
- <!ENTITY libraries SYSTEM "thirdparty/libraries.ent">
- ]>
-<!--
-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.
- -->
-
-<!-- =========================================================================================== -->
-<!-- -->
-<!-- $Id$ -->
-<!-- -->
-<!-- =========================================================================================== -->
-
-
-<project name="HornetQ" default="jar">
-
- <property name="hornetq.run_script" value="false" />
-
- <fail message="*** Please build by using the build.sh script (or build.bat on Windows) ***">
- <condition>
- <not>
- <equals arg1="${hornetq.run_script}" arg2="true"/>
- </not>
- </condition>
- </fail>
-
- <!--
- Setting "external.project" to true makes jbossbuild use the current directory, and not its
- parent, as project root. DO NOT change this.
- -->
- <property name="external.project" value="true"/>
- <!--
- Setting "nodownload" to true inhibits downloading of up-to-date dependencies.
- -->
- <property name="nodownload" value="false"/>
-
- <target name="createthirdparty" unless="inhibit.downloads" depends="check.inhibit.downloads">
- <ant antfile="build-thirdparty.xml" target="maven-install"/>
- </target>
-
- <target name="check.inhibit.downloads">
- <condition property="inhibit.downloads">
- <or>
- <uptodate property="dependencies.current"
- srcfile="pom.xml"
- targetfile="./thirdparty/libraries.ent"/>
- <istrue value="${nodownload}"/>
- </or>
- </condition>
- </target>
-
- <target name="clean" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="clean"/>
- </target>
-
- <target name="init" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="init"/>
- </target>
-
- <target name="compile" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile"/>
- </target>
-
- <target name="compile-core" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-core"/>
- </target>
-
- <target name="compile-jms" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-jms"/>
- </target>
-
- <target name="compile-transports" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-transports"/>
- </target>
-
- <target name="compile-security" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-security"/>
- </target>
-
- <target name="compile-boostrap" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-bootstrap"/>
- </target>
-
- <target name="compile-logging" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-logging"/>
- </target>
-
- <target name="compile-ra" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-ra"/>
- </target>
-
- <target name="build-native" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="build-native"/>
- </target>
-
- <target name="userdoc">
- <ant antfile="build-hornetq.xml" target="userdoc"/>
- </target>
-
- <target name="javadoc">
- <ant antfile="build-hornetq.xml" target="javadoc"/>
- </target>
-
- <target name="validate-configuration">
- <ant antfile="build-hornetq.xml" target="validate-configuration"/>
- </target>
-
- <!-- ======================================================================================== -->
- <!-- Archival Tasks -->
- <!-- ======================================================================================== -->
-
- <target name="jar" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar"/>
- </target>
-
- <target name="jar-core" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-core"/>
- </target>
-
- <target name="jar-jms" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-jms"/>
- </target>
-
- <target name="jar-jms-api" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-jms-api"/>
- </target>
-
- <target name="jar-jms-client" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-jms-client"/>
- </target>
-
- <target name="jar-transports" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-transports"/>
- </target>
-
- <target name="jar-jboss-service" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-jboss-service"/>
- </target>
-
- <target name="jar-security" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-security"/>
- </target>
-
- <target name="jar-bootstrap" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-bootstrap"/>
- </target>
-
- <target name="jar-logging" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-logging"/>
- </target>
-
- <target name="jar-core-client" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-core-client"/>
- </target>
-
- <target name="jar-ra" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-ra"/>
- </target>
-
- <target name="jar-mc" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jar-mc"/>
- </target>
-
- <!-- ======================================================================================== -->
- <!-- Distro Tasks -->
- <!-- ======================================================================================== -->
- <target name="deploy-jboss" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="deploy-jboss"/>
- </target>
-
- <target name="deploy" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="deploy"/>
- </target>
-
- <target name="build.sar" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="build.sar"/>
- </target>
-
- <target name="distro" depends="bin-distro, source-distro" />
-
- <target name="bin-distro" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="bin-distro"/>
- </target>
-
- <target name="source-distro" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="source-distro"/>
- </target>
-
- <target name="artifacts" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="artifacts"/>
- </target>
-
-
- <!-- test targets -->
-
-
- <target name="compile-unit-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-unit-tests"/>
- </target>
-
- <target name="compile-jms-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile"/>
- </target>
-
- <target name="compile-joram-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile"/>
- </target>
-
- <target name="unit-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="unit-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="timing-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="timing-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="integration-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="integration-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="failover-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="failover-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="distribution-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="distribution-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="concurrent-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="concurrent-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="performance-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="performance-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="stress-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="stress-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="jms-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="jms-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="joram-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="joram-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="all-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="all-tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="hudson-tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="hudson-tests"/>
- </target>
-
- <target name="dev-tests" depends="createthirdparty">
- <mkdir dir="./tmp"/>
- <ant antfile="build-hornetq.xml" target="hudson-tests">
- <property name="java.io.tmpdir" value="./tmp"/>
- </ant>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="tests" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="tests"/>
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="compile-reports" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="compile-reports"/>
- </target>
-
- <target name="emma" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="emma"/>
- </target>
-
- <!--server-->
-
- <target name="runServer" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="runServer"/>
- </target>
-
- <target name="runClusteredServer" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="runClusteredServer"/>
- </target>
-
- <target name="debugServer" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="debugServer"/>
- </target>
-
- <target name="findbugs" depends="createthirdparty">
- <ant antfile="build-hornetq.xml" target="findbugs"/>
- </target>
-
-</project>
Added: trunk/src/config/jboss-as-4/build.bat
===================================================================
--- trunk/src/config/jboss-as-4/build.bat (rev 0)
+++ trunk/src/config/jboss-as-4/build.bat 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,13 @@
+@echo off
+
+set "OVERRIDE_ANT_HOME=..\..\tools\ant"
+
+if exist "..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\src\bin\build.bat %*
+) else (
+ rem running from the distro
+ call ..\..\bin\build.bat %*
+)
+
+set "OVERRIDE_ANT_HOME="
Added: trunk/src/config/jboss-as-4/build.sh
===================================================================
--- trunk/src/config/jboss-as-4/build.sh (rev 0)
+++ trunk/src/config/jboss-as-4/build.sh 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+OVERRIDE_ANT_HOME=../../tools/ant
+export OVERRIDE_ANT_HOME
+
+if [ -f "../../src/bin/build.sh" ]; then
+ # running from TRUNK
+ ../../src/bin/build.sh "$@"
+else
+ # running from the distro
+ ../../bin/build.sh "$@"
+fi
+
+
+
Added: trunk/src/config/jboss-as-4/build.xml
===================================================================
--- trunk/src/config/jboss-as-4/build.xml (rev 0)
+++ trunk/src/config/jboss-as-4/build.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+ -->
+<!-- author: Lucas Amador -->
+<project default="default" name="HornetQ integration with JBoss AS 4">
+ <property environment="ENV"/>
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
+ <property name="src.bin.dir" value="../../bin"/>
+ <property name="dest.bin.dir" value="${jboss.home}/bin"/>
+ <property name="lib.dir" value="../../lib"/>
+
+ <target name="default" description="Create JBoss AS 4 profiles to use HornetQ">
+ <antcall target="create-profile">
+ <!-- created from JBoss AS 4 default profile -->
+ <param name="jbossas.profile.source" value="default"/>
+ <!-- based on HornetQ jbossas/non-clustered config -->
+ <param name="hornetq.config.dir" value="./non-clustered"/>
+ <!-- new profile is named default-with-hornetq -->
+ <param name="hornetq.profile.target" value="default-with-hornetq"/>
+ </antcall>
+ <antcall target="create-profile">
+ <!-- created from JBoss AS 4 all profile -->
+ <param name="jbossas.profile.source" value="all"/>
+ <!-- based on HornetQ jbossas/clustered config -->
+ <param name="hornetq.config.dir" value="clustered"/>
+ <!-- new profile is named all-with-hornetq -->
+ <param name="hornetq.profile.target" value="all-with-hornetq"/>
+ </antcall>
+ <mkdir dir="${dest.bin.dir}/native"/>
+ <copy todir="${dest.bin.dir}/native" file="${src.bin.dir}/libHornetQAIO32.so"/>
+ <copy todir="${dest.bin.dir}/native" file="${src.bin.dir}/libHornetQAIO64.so"/>
+ </target>
+
+ <target name="create-profile">
+ <antcall target="validate-jboss"/>
+ <property name="src.dir" value="${jboss.home}/server/${jbossas.profile.source}"/>
+ <property name="dest.dir" value="${jboss.home}/server/${hornetq.profile.target}"/>
+
+ <mkdir dir="${dest.dir}"/>
+ <copy todir="${dest.dir}">
+ <fileset dir="${src.dir}">
+ <exclude name="**/messaging/**"/>
+ <exclude name="conf/login-config.xml"/>
+ <exclude name="**/jms-ra.rar"/>
+ <exclude name="**/jms/" />
+ </fileset>
+ </copy>
+ <copy todir="${dest.dir}/conf">
+ <fileset dir="${hornetq.config.dir}">
+ <include name="login-config.xml"/>
+ </fileset>
+ </copy>
+ <copy todir="${dest.dir}/conf/props">
+ <fileset dir="${hornetq.config.dir}">
+ <include name="hornetq-users.properties"/>
+ <include name="hornetq-roles.properties"/>
+ </fileset>
+ </copy>
+ <copy todir="${dest.dir}/lib">
+ <fileset dir="${lib.dir}">
+ <include name="hornetq-*.jar"/>
+ <include name="netty*.jar"/>
+ </fileset>
+ </copy>
+
+ <property name="hornetq.sar.dir" value="${dest.dir}/deploy/hornetq.sar"/>
+
+ <unzip src="${lib.dir}/hornetq-service.sar" dest="${hornetq.sar.dir}"/>
+ <copy todir="${hornetq.sar.dir}">
+ <fileset dir="${hornetq.config.dir}">
+ <include name="hornetq-configuration.xml" />
+ <include name="hornetq-jms.xml" />
+ </fileset>
+ </copy>
+ <copy todir="${hornetq.sar.dir}" file="${hornetq.config.dir}/jms-ds.xml"/>
+
+ <copy todir="${hornetq.sar.dir}/META-INF" file="${hornetq.config.dir}/jboss-service.xml"/>
+
+ <property name="jms-ra.rar.dir" value="${dest.dir}/deploy/jms-ra.rar"/>
+ <unzip src="${lib.dir}/hornetq-ra.rar" dest="${jms-ra.rar.dir}"/>
+ <copy todir="${jms-ra.rar.dir}/META-INF/" file="${hornetq.config.dir}/ra.xml"/>
+ <copy todir="${jms-ra.rar.dir}">
+ <fileset dir="${lib.dir}">
+ <include name="netty*.jar"/>
+ </fileset>
+ </copy>
+
+ </target>
+
+ <!-- The JBOSS_HOME environment variable and the directory must exist -->
+ <target name="validate-jboss">
+ <fail unless="ENV.JBOSS_HOME" message="JBOSS_HOME environment variable not set! Set it and try again."/>
+ <available property="source-profile" type="dir" file="${jboss.home}/server/${jbossas.profile.source}"/>
+ <fail unless="source-profile" message="${jboss.home}/server/${jbossas.profile.source} profile not found!"/>
+ <available property="target-profile" type="dir" file="${jboss.home}/server/${hornetq.profile.target}"/>
+ <fail if="target-profile"
+ message="'${hornetq.profile.target}' profile already exists! Delete it manually and try again."/>
+ </target>
+
+</project>
Added: trunk/src/config/jboss-as-4/clustered/hornetq-configuration.xml
===================================================================
--- trunk/src/config/jboss-as-4/clustered/hornetq-configuration.xml (rev 0)
+++ trunk/src/config/jboss-as-4/clustered/hornetq-configuration.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,119 @@
+<!--
+ ~ 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.
+ -->
+
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <clustered>true</clustered>
+
+ <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+
+ <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+ <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+
+ <journal-min-files>10</journal-min-files>
+
+ <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+ <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </connector>
+
+ <connector name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
+ </connector>
+
+ </connectors>
+
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </acceptor>
+
+ <acceptor name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </acceptor>
+
+ <acceptor name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="server-id" value="0"/>
+ </acceptor>
+
+ </acceptors>
+
+ <broadcast-groups>
+ <broadcast-group name="bg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <broadcast-period>5000</broadcast-period>
+ <connector-ref connector-name="netty"/>
+ </broadcast-group>
+ </broadcast-groups>
+
+ <discovery-groups>
+ <discovery-group name="dg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <refresh-timeout>10000</refresh-timeout>
+ </discovery-group>
+ </discovery-groups>
+
+ <cluster-connections>
+ <cluster-connection name="my-cluster">
+ <address>jms</address>
+ <discovery-group-ref discovery-group-name="dg-group1"/>
+ </cluster-connection>
+ </cluster-connections>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
+
+</configuration>
Added: trunk/src/config/jboss-as-4/clustered/hornetq-jms.xml
===================================================================
--- trunk/src/config/jboss-as-4/clustered/hornetq-jms.xml (rev 0)
+++ trunk/src/config/jboss-as-4/clustered/hornetq-jms.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,43 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+ <connection-factory name="NettyConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="/ConnectionFactory"/>
+ <entry name="/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="NettyThroughputConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty-throughput"/>
+ </connectors>
+ <entries>
+ <entry name="/ThroughputConnectionFactory"/>
+ <entry name="/XAThroughputConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="InVMConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ <entry name="java:/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="DLQ">
+ <entry name="/queue/DLQ"/>
+ </queue>
+
+ <queue name="ExpiryQueue">
+ <entry name="/queue/ExpiryQueue"/>
+ </queue>
+
+</configuration>
Added: trunk/src/config/jboss-as-4/clustered/hornetq-roles.properties
===================================================================
--- trunk/src/config/jboss-as-4/clustered/hornetq-roles.properties (rev 0)
+++ trunk/src/config/jboss-as-4/clustered/hornetq-roles.properties 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,4 @@
+#
+# user=role1,role2,...
+#
+guest=guest
Added: trunk/src/config/jboss-as-4/clustered/hornetq-users.properties
===================================================================
--- trunk/src/config/jboss-as-4/clustered/hornetq-users.properties (rev 0)
+++ trunk/src/config/jboss-as-4/clustered/hornetq-users.properties 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,4 @@
+#
+# user=password
+#
+guest=guest
Added: trunk/src/config/jboss-as-4/clustered/jboss-service.xml
===================================================================
--- trunk/src/config/jboss-as-4/clustered/jboss-service.xml (rev 0)
+++ trunk/src/config/jboss-as-4/clustered/jboss-service.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<server>
+
+ <mbean code="org.hornetq.service.HornetQFileConfigurationService"
+ name="org.hornetq:service=HornetQFileConfigurationService">
+ </mbean>
+
+ <mbean code="org.hornetq.service.JBossASSecurityManagerService"
+ name="org.hornetq:service=JBossASSecurityManagerService">
+ </mbean>
+
+ <mbean code="org.hornetq.service.HornetQStarterService"
+ name="org.hornetq:service=HornetQStarterService">
+ <!--lets let the JMS Server start us-->
+ <attribute name="Start">false</attribute>
+
+ <depends optional-attribute-name="SecurityManagerService"
+ proxy-type="attribute">org.hornetq:service=JBossASSecurityManagerService</depends>
+ <depends optional-attribute-name="ConfigurationService"
+ proxy-type="attribute">org.hornetq:service=HornetQFileConfigurationService</depends>
+ </mbean>
+
+ <mbean code="org.hornetq.service.HornetQJMSStarterService"
+ name="org.hornetq:service=HornetQJMSStarterService">
+ <depends optional-attribute-name="HornetQServer"
+ proxy-type="attribute">org.hornetq:service=HornetQStarterService</depends>
+ </mbean>
+
+</server>
Copied: trunk/src/config/jboss-as-4/clustered/jms-ds.xml (from rev 9165, trunk/src/config/jboss-as/clustered/jboss-as-4/jms-ds.xml)
===================================================================
--- trunk/src/config/jboss-as-4/clustered/jms-ds.xml (rev 0)
+++ trunk/src/config/jboss-as-4/clustered/jms-ds.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,45 @@
+<!--
+ ~ 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.
+ -->
+
+<connection-factories>
+ <!--
+ JMS Stuff
+ -->
+
+ <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
+ <attribute name="ProviderName">DefaultJMSProvider</attribute>
+ <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+ <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="Properties">
+ java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+ java.naming.factory.url.pkgs=org.jnp.interfaces
+ java.naming.provider.url=localhost:1199
+ </attribute>
+
+ </mbean>
+ <!--
+ JMS XA Resource adapter, use this to get transacted JMS in beans
+ -->
+ <tx-connection-factory>
+ <jndi-name>JmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>jms-ra.rar</rar-name>
+ <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+ <max-pool-size>20</max-pool-size>
+ <security-domain-and-application>JmsXARealm</security-domain-and-application>
+ </tx-connection-factory>
+</connection-factories>
Copied: trunk/src/config/jboss-as-4/clustered/ra.xml (from rev 9165, trunk/src/config/jboss-as/clustered/jboss-as-4/ra.xml)
===================================================================
--- trunk/src/config/jboss-as-4/clustered/ra.xml (rev 0)
+++ trunk/src/config/jboss-as-4/clustered/ra.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ 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.
+ -->
+
+<!-- $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.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
+ <config-property>
+ <description>The transport type</description>
+ <config-property-name>ConnectorClassName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transport configuration. These values must be in the form of key=val;key=val;</description>
+ <config-property-name>ConnectionParameters</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>host=localhost;port=5445</config-property-value>
+ </config-property>
+ <!--
+ <config-property>
+ <description>The method to use for locatingthe 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 Backup transport type</description>
+ <config-property-name>BackUpTransportType</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The Backup transport configuration. These values must be in the form of key=val;key=val;</description>
+ <config-property-name>TransportConfiguration</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 address</description>
+ <config-property-name>DiscoveryGroupAddress</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>DiscoveryGroupPort</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 producer window size</description>
+ <config-property-name>ProducerWindowSize</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>Should clean server shutdown trigger failover?</description>
+ <config-property-name>FailoverOnServerShutdown</config-property-name>
+ <config-property-type>java.lang.Boolean</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>-->
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.hornetq.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.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>javax.jms.Session</connection-interface>
+ <connection-impl-class>org.hornetq.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.hornetq.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>
Added: trunk/src/config/jboss-as-4/non-clustered/hornetq-configuration.xml
===================================================================
--- trunk/src/config/jboss-as-4/non-clustered/hornetq-configuration.xml (rev 0)
+++ trunk/src/config/jboss-as-4/non-clustered/hornetq-configuration.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,93 @@
+<!--
+ ~ 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.
+ -->
+
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+
+ <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+ <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+
+ <journal-min-files>10</journal-min-files>
+
+ <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+ <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </connector>
+
+ <connector name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
+ </connector>
+
+ </connectors>
+
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </acceptor>
+
+ <acceptor name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </acceptor>
+
+ <acceptor name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="server-id" value="0"/>
+ </acceptor>
+
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
+
+</configuration>
Added: trunk/src/config/jboss-as-4/non-clustered/hornetq-jms.xml
===================================================================
--- trunk/src/config/jboss-as-4/non-clustered/hornetq-jms.xml (rev 0)
+++ trunk/src/config/jboss-as-4/non-clustered/hornetq-jms.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,43 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+ <connection-factory name="NettyConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="/ConnectionFactory"/>
+ <entry name="/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="NettyThroughputConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty-throughput"/>
+ </connectors>
+ <entries>
+ <entry name="/ThroughputConnectionFactory"/>
+ <entry name="/XAThroughputConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="InVMConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ <entry name="java:/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="DLQ">
+ <entry name="/queue/DLQ"/>
+ </queue>
+
+ <queue name="ExpiryQueue">
+ <entry name="/queue/ExpiryQueue"/>
+ </queue>
+
+</configuration>
Added: trunk/src/config/jboss-as-4/non-clustered/hornetq-roles.properties
===================================================================
--- trunk/src/config/jboss-as-4/non-clustered/hornetq-roles.properties (rev 0)
+++ trunk/src/config/jboss-as-4/non-clustered/hornetq-roles.properties 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,17 @@
+#
+# 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.
+#
+
+#
+# user=role1,role2,...
+#
+guest=guest
Added: trunk/src/config/jboss-as-4/non-clustered/hornetq-users.properties
===================================================================
--- trunk/src/config/jboss-as-4/non-clustered/hornetq-users.properties (rev 0)
+++ trunk/src/config/jboss-as-4/non-clustered/hornetq-users.properties 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,4 @@
+#
+# user=password
+#
+guest=guest
Copied: trunk/src/config/jboss-as-4/non-clustered/jboss-service.xml (from rev 9165, trunk/src/config/service/jboss-service.xml)
===================================================================
--- trunk/src/config/jboss-as-4/non-clustered/jboss-service.xml (rev 0)
+++ trunk/src/config/jboss-as-4/non-clustered/jboss-service.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<server>
+
+ <mbean code="org.hornetq.service.HornetQFileConfigurationService"
+ name="org.hornetq:service=HornetQFileConfigurationService">
+ </mbean>
+
+ <mbean code="org.hornetq.service.JBossASSecurityManagerService"
+ name="org.hornetq:service=JBossASSecurityManagerService">
+ </mbean>
+
+ <mbean code="org.hornetq.service.HornetQStarterService"
+ name="org.hornetq:service=HornetQStarterService">
+ <!--lets let the JMS Server start us-->
+ <attribute name="Start">false</attribute>
+
+ <depends optional-attribute-name="SecurityManagerService"
+ proxy-type="attribute">org.hornetq:service=JBossASSecurityManagerService</depends>
+ <depends optional-attribute-name="ConfigurationService"
+ proxy-type="attribute">org.hornetq:service=HornetQFileConfigurationService</depends>
+ </mbean>
+
+ <mbean code="org.hornetq.service.HornetQJMSStarterService"
+ name="org.hornetq:service=HornetQJMSStarterService">
+ <depends optional-attribute-name="HornetQServer"
+ proxy-type="attribute">org.hornetq:service=HornetQStarterService</depends>
+ </mbean>
+
+</server>
Copied: trunk/src/config/jboss-as-4/non-clustered/jms-ds.xml (from rev 9165, trunk/src/config/jboss-as/non-clustered/jboss-as-4/jms-ds.xml)
===================================================================
--- trunk/src/config/jboss-as-4/non-clustered/jms-ds.xml (rev 0)
+++ trunk/src/config/jboss-as-4/non-clustered/jms-ds.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,39 @@
+<!--
+ ~ 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.
+ -->
+
+<connection-factories>
+ <!--
+ JMS Stuff
+ -->
+
+ <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
+ <attribute name="ProviderName">DefaultJMSProvider</attribute>
+ <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+ <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+ </mbean>
+ <!--
+ JMS XA Resource adapter, use this to get transacted JMS in beans
+ -->
+ <tx-connection-factory>
+ <jndi-name>JmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>jms-ra.rar</rar-name>
+ <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+ <max-pool-size>20</max-pool-size>
+ <security-domain-and-application>JmsXARealm</security-domain-and-application>
+ </tx-connection-factory>
+</connection-factories>
Added: trunk/src/config/jboss-as-4/non-clustered/login-config.xml
===================================================================
--- trunk/src/config/jboss-as-4/non-clustered/login-config.xml (rev 0)
+++ trunk/src/config/jboss-as-4/non-clustered/login-config.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,159 @@
+<?xml version='1.0'?>
+
+<!--
+ ~ 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.
+ -->
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+ <authentication>
+ <login-module code="login.module1.class.name" flag="control_flag">
+ <module-option name = "option1-name">option1-value</module-option>
+ <module-option name = "option2-name">option2-value</module-option>
+ ...
+ </login-module>
+
+ <login-module code="login.module2.class.name" flag="control_flag">
+ ...
+ </login-module>
+ ...
+ </authentication>
+</application-policy>
+
+$Id: login-config.xml 76444 2008-07-29 23:50:53Z sguilhen(a)redhat.com $
+$Revision: 76444 $
+-->
+
+<policy>
+ <!-- Used by clients within the application server VM such as
+ mbeans and servlets that access EJBs.
+ -->
+ <application-policy name="client-login">
+ <authentication>
+ <login-module code="org.jboss.security.ClientLoginModule"
+ flag="required">
+ <!-- Any existing security context will be restored on logout -->
+ <module-option name="restore-login-identity">true</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- Security domains for testing new jca framework -->
+ <application-policy name="HsqlDbRealm">
+ <authentication>
+ <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+ flag="required">
+ <module-option name="principal">sa</module-option>
+ <module-option name="userName">sa</module-option>
+ <module-option name="password"></module-option>
+ <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <application-policy name="JmsXARealm">
+ <authentication>
+ <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+ flag="required">
+ <module-option name="principal">guest</module-option>
+ <module-option name="userName">guest</module-option>
+ <module-option name="password">guest</module-option>
+ <module-option name="managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for hornetq. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+<application-policy name="hornetq">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name = "unauthenticatedIdentity">guest</module-option>
+ <module-option name="usersProperties">props/hornetq-users.properties</module-option>
+ <module-option name="rolesProperties">props/hornetq-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for the jmx-console web application. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="jmx-console">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
+ <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for the web-console web application. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="web-console">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">web-console-users.properties</module-option>
+ <module-option name="rolesProperties">web-console-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!--
+ A template configuration for the JBossWS security domain.
+ This defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="JBossWS">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">props/jbossws-users.properties</module-option>
+ <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
+ <module-option name="unauthenticatedIdentity">anonymous</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- The default login configuration used by any security domain that
+ does not have a application-policy entry with a matching name
+ -->
+ <application-policy name="other">
+ <!-- A simple server login module, which can be used when the number
+ of users is relatively small. It uses two properties files:
+ users.properties, which holds users (key) and their password (value).
+ roles.properties, which holds users (key) and a comma-separated list of
+ their roles (value).
+ The unauthenticatedIdentity property defines the name of the principal
+ that will be used when a null username and password are presented as is
+ the case for an unuathenticated web client or MDB. If you want to
+ allow such users to be authenticated add the property, e.g.,
+ unauthenticatedIdentity="nobody"
+ -->
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required"/>
+ </authentication>
+ </application-policy>
+
+</policy>
Copied: trunk/src/config/jboss-as-4/non-clustered/ra.xml (from rev 9165, trunk/src/config/jboss-as/non-clustered/jboss-as-4/ra.xml)
===================================================================
--- trunk/src/config/jboss-as-4/non-clustered/ra.xml (rev 0)
+++ trunk/src/config/jboss-as-4/non-clustered/ra.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ 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.
+ -->
+
+<!-- $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.hornetq.ra.HornetQResourceAdapter</resourceadapter-class>
+ <config-property>
+ <description>The transport type</description>
+ <config-property-name>ConnectorClassName</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</config-property-value>
+ </config-property>
+ <config-property>
+ <description>The transport configuration. These values must be in the form of key=val;key=val;</description>
+ <config-property-name>ConnectionParameters</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value>host=localhost;port=5445</config-property-value>
+ </config-property>
+ <!--
+ <config-property>
+ <description>The method to use for locatingthe 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 Backup transport type</description>
+ <config-property-name>BackUpTransportType</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
+ <config-property-value></config-property-value>
+ </config-property>
+ <config-property>
+ <description>The Backup transport configuration. These values must be in the form of key=val;key=val;</description>
+ <config-property-name>TransportConfiguration</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 address</description>
+ <config-property-name>DiscoveryGroupAddress</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>DiscoveryGroupPort</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 producer window size</description>
+ <config-property-name>ProducerWindowSize</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>Should clean server shutdown trigger failover?</description>
+ <config-property-name>FailoverOnServerShutdown</config-property-name>
+ <config-property-type>java.lang.Boolean</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>-->
+
+ <outbound-resourceadapter>
+ <connection-definition>
+ <managedconnectionfactory-class>org.hornetq.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.hornetq.ra.HornetQRAConnectionFactory</connectionfactory-interface>
+ <connectionfactory-impl-class>org.hornetq.ra.HornetQRAConnectionFactoryImpl</connectionfactory-impl-class>
+ <connection-interface>javax.jms.Session</connection-interface>
+ <connection-impl-class>org.hornetq.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.hornetq.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>
Copied: trunk/src/config/jboss-as-5/build.bat (from rev 9165, trunk/src/config/jboss-as/build.bat)
===================================================================
--- trunk/src/config/jboss-as-5/build.bat (rev 0)
+++ trunk/src/config/jboss-as-5/build.bat 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,13 @@
+@echo off
+
+set "OVERRIDE_ANT_HOME=..\..\tools\ant"
+
+if exist "..\..\src\bin\build.bat" (
+ rem running from TRUNK
+ call ..\..\src\bin\build.bat %*
+) else (
+ rem running from the distro
+ call ..\..\bin\build.bat %*
+)
+
+set "OVERRIDE_ANT_HOME="
Copied: trunk/src/config/jboss-as-5/build.sh (from rev 9165, trunk/src/config/jboss-as/build.sh)
===================================================================
--- trunk/src/config/jboss-as-5/build.sh (rev 0)
+++ trunk/src/config/jboss-as-5/build.sh 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+OVERRIDE_ANT_HOME=../../tools/ant
+export OVERRIDE_ANT_HOME
+
+if [ -f "../../src/bin/build.sh" ]; then
+ # running from TRUNK
+ ../../src/bin/build.sh "$@"
+else
+ # running from the distro
+ ../../bin/build.sh "$@"
+fi
+
+
+
Property changes on: trunk/src/config/jboss-as-5/build.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/src/config/jboss-as-5/build.xml
===================================================================
--- trunk/src/config/jboss-as-5/build.xml (rev 0)
+++ trunk/src/config/jboss-as-5/build.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+ -->
+<project default="default" name="HornetQ integration with JBoss AS 5">
+ <property environment="ENV"/>
+ <property name="jboss.home" value="${ENV.JBOSS_HOME}"/>
+ <property name="src.bin.dir" value="../../bin"/>
+ <property name="dest.bin.dir" value="${jboss.home}/bin"/>
+ <property name="lib.dir" value="../../lib"/>
+
+ <target name="default" description="Create JBoss AS 5 profiles to use HornetQ">
+ <antcall target="create-profile">
+ <!-- created from JBoss AS 5 default profile -->
+ <param name="jbossas.profile.source" value="default"/>
+ <!-- based on HornetQ jbossas/non-clustered config -->
+ <param name="hornetq.config.dir" value="./non-clustered"/>
+ <!-- new profile is named default-with-hornetq -->
+ <param name="hornetq.profile.target" value="default-with-hornetq"/>
+ </antcall>
+ <antcall target="create-profile">
+ <!-- created from JBoss AS 5 all profile -->
+ <param name="jbossas.profile.source" value="all"/>
+ <!-- based on HornetQ jbossas/clustered config -->
+ <param name="hornetq.config.dir" value="clustered"/>
+ <!-- new profile is named all-with-hornetq -->
+ <param name="hornetq.profile.target" value="all-with-hornetq"/>
+ </antcall>
+ <mkdir dir="${dest.bin.dir}/META-INF/lib/linux2/x86"/>
+ <mkdir dir="${dest.bin.dir}/META-INF/lib/linux2/x64"/>
+ <copy todir="${dest.bin.dir}/META-INF/lib/linux2/x86" file="${src.bin.dir}/libHornetQAIO32.so"/>
+ <copy todir="${dest.bin.dir}/META-INF/lib/linux2/x64" file="${src.bin.dir}/libHornetQAIO64.so"/>
+ </target>
+
+ <target name="create-profile">
+ <antcall target="validate-jboss"/>
+ <property name="src.dir" value="${jboss.home}/server/${jbossas.profile.source}"/>
+ <property name="dest.dir" value="${jboss.home}/server/${hornetq.profile.target}"/>
+
+ <mkdir dir="${dest.dir}"/>
+ <copy todir="${dest.dir}">
+ <fileset dir="${src.dir}">
+ <exclude name="**/messaging/**"/>
+ <exclude name="conf/login-config.xml"/>
+ <!--<exclude name="**/jms-ra.rar"/>-->
+ </fileset>
+ </copy>
+ <copy todir="${dest.dir}/conf">
+ <fileset dir="${hornetq.config.dir}">
+ <include name="login-config.xml"/>
+ </fileset>
+ </copy>
+ <copy todir="${dest.dir}/conf/props">
+ <fileset dir="${hornetq.config.dir}">
+ <include name="hornetq-users.properties"/>
+ <include name="hornetq-roles.properties"/>
+ </fileset>
+ </copy>
+ <copy todir="${dest.dir}/lib">
+ <fileset dir="${lib.dir}">
+ <include name="hornetq-*.jar"/>
+ <include name="netty*.jar"/>
+ </fileset>
+ </copy>
+ <property name="hornetq.sar.dir" value="${dest.dir}/deploy/hornetq.sar"/>
+ <mkdir dir="${hornetq.sar.dir}"/>
+ <copy todir="${hornetq.sar.dir}">
+ <fileset dir="${hornetq.config.dir}" includes="*" excludes="**/jboss-as-4/**"/>
+ </copy>
+ <unzip src="${lib.dir}/hornetq-ra.rar" dest="${dest.dir}/deploy/hornetq-ra.rar"/>
+ </target>
+
+ <!-- The JBOSS_HOME environment variable and the directory must exist, we also check we are running
+ in JBoss 5.1 or later -->
+ <target name="validate-jboss">
+ <fail unless="ENV.JBOSS_HOME" message="JBOSS_HOME environment variable not set! Set it and try again."/>
+ <available property="source-profile" type="dir" file="${jboss.home}/server/${jbossas.profile.source}"/>
+ <fail unless="source-profile" message="${jboss.home}/server/${jbossas.profile.source} profile not found!"/>
+ <available property="target-profile" type="dir" file="${jboss.home}/server/${hornetq.profile.target}"/>
+ <fail if="target-profile"
+ message="'${hornetq.profile.target}' profile already exists! Delete it manually and try again."/>
+ </target>
+
+</project>
Copied: trunk/src/config/jboss-as-5/clustered/hornetq-configuration.xml (from rev 9165, trunk/src/config/jboss-as/clustered/hornetq-configuration.xml)
===================================================================
--- trunk/src/config/jboss-as-5/clustered/hornetq-configuration.xml (rev 0)
+++ trunk/src/config/jboss-as-5/clustered/hornetq-configuration.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,119 @@
+<!--
+ ~ 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.
+ -->
+
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <clustered>true</clustered>
+
+ <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+
+ <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+ <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+
+ <journal-min-files>10</journal-min-files>
+
+ <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+ <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </connector>
+
+ <connector name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
+ </connector>
+
+ </connectors>
+
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </acceptor>
+
+ <acceptor name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </acceptor>
+
+ <acceptor name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="server-id" value="0"/>
+ </acceptor>
+
+ </acceptors>
+
+ <broadcast-groups>
+ <broadcast-group name="bg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <broadcast-period>5000</broadcast-period>
+ <connector-ref connector-name="netty"/>
+ </broadcast-group>
+ </broadcast-groups>
+
+ <discovery-groups>
+ <discovery-group name="dg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <refresh-timeout>10000</refresh-timeout>
+ </discovery-group>
+ </discovery-groups>
+
+ <cluster-connections>
+ <cluster-connection name="my-cluster">
+ <address>jms</address>
+ <discovery-group-ref discovery-group-name="dg-group1"/>
+ </cluster-connection>
+ </cluster-connections>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
+
+</configuration>
Copied: trunk/src/config/jboss-as-5/clustered/hornetq-jboss-beans.xml (from rev 9165, trunk/src/config/jboss-as/clustered/hornetq-jboss-beans.xml)
===================================================================
--- trunk/src/config/jboss-as-5/clustered/hornetq-jboss-beans.xml (rev 0)
+++ trunk/src/config/jboss-as-5/clustered/hornetq-jboss-beans.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="org.jboss.mx.util.MBeanServerLocator"
+ factoryMethod="locateJBoss"/>
+ </bean>
+
+ <!-- The core configuration -->
+ <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/>
+
+ <!-- The security manager -->
+ <bean name="HornetQSecurityManager" class="org.hornetq.integration.jboss.security.JBossASSecurityManager">
+ <depends>JBossSecurityJNDIContextEstablishment</depends>
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The core server -->
+ <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="Configuration"/>
+ </parameter>
+ <parameter>
+ <inject bean="MBeanServer"/>
+ </parameter>
+ <parameter>
+ <inject bean="HornetQSecurityManager"/>
+ </parameter>
+ </constructor>
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="HornetQServer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
+</deployment>
Copied: trunk/src/config/jboss-as-5/clustered/hornetq-jms.xml (from rev 9165, trunk/src/config/jboss-as/clustered/hornetq-jms.xml)
===================================================================
--- trunk/src/config/jboss-as-5/clustered/hornetq-jms.xml (rev 0)
+++ trunk/src/config/jboss-as-5/clustered/hornetq-jms.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,43 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+ <connection-factory name="NettyConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="/ConnectionFactory"/>
+ <entry name="/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="NettyThroughputConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty-throughput"/>
+ </connectors>
+ <entries>
+ <entry name="/ThroughputConnectionFactory"/>
+ <entry name="/XAThroughputConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="InVMConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ <entry name="java:/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="DLQ">
+ <entry name="/queue/DLQ"/>
+ </queue>
+
+ <queue name="ExpiryQueue">
+ <entry name="/queue/ExpiryQueue"/>
+ </queue>
+
+</configuration>
Copied: trunk/src/config/jboss-as-5/clustered/hornetq-roles.properties (from rev 9165, trunk/src/config/jboss-as/clustered/hornetq-roles.properties)
===================================================================
--- trunk/src/config/jboss-as-5/clustered/hornetq-roles.properties (rev 0)
+++ trunk/src/config/jboss-as-5/clustered/hornetq-roles.properties 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,4 @@
+#
+# user=role1,role2,...
+#
+guest=guest
Copied: trunk/src/config/jboss-as-5/clustered/hornetq-users.properties (from rev 9165, trunk/src/config/jboss-as/clustered/hornetq-users.properties)
===================================================================
--- trunk/src/config/jboss-as-5/clustered/hornetq-users.properties (rev 0)
+++ trunk/src/config/jboss-as-5/clustered/hornetq-users.properties 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,4 @@
+#
+# user=password
+#
+guest=guest
Copied: trunk/src/config/jboss-as-5/clustered/jms-ds.xml (from rev 9165, trunk/src/config/jboss-as/clustered/jms-ds.xml)
===================================================================
--- trunk/src/config/jboss-as-5/clustered/jms-ds.xml (rev 0)
+++ trunk/src/config/jboss-as-5/clustered/jms-ds.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,26 @@
+<connection-factories>
+ <!--
+ JMS Stuff
+ -->
+
+ <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
+ <attribute name="ProviderName">DefaultJMSProvider</attribute>
+ <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+ <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+ </mbean>
+ <!--
+ JMS XA Resource adapter, use this to get transacted JMS in beans
+ -->
+ <tx-connection-factory>
+ <jndi-name>JmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>hornetq-ra.rar</rar-name>
+ <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+ <max-pool-size>20</max-pool-size>
+ <security-domain-and-application>JmsXARealm</security-domain-and-application>
+ </tx-connection-factory>
+</connection-factories>
Copied: trunk/src/config/jboss-as-5/clustered/login-config.xml (from rev 9165, trunk/src/config/jboss-as/clustered/login-config.xml)
===================================================================
--- trunk/src/config/jboss-as-5/clustered/login-config.xml (rev 0)
+++ trunk/src/config/jboss-as-5/clustered/login-config.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,146 @@
+<?xml version='1.0'?>
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+ <authentication>
+ <login-module code="login.module1.class.name" flag="control_flag">
+ <module-option name = "option1-name">option1-value</module-option>
+ <module-option name = "option2-name">option2-value</module-option>
+ ...
+ </login-module>
+
+ <login-module code="login.module2.class.name" flag="control_flag">
+ ...
+ </login-module>
+ ...
+ </authentication>
+</application-policy>
+
+$Id: login-config.xml 76444 2008-07-29 23:50:53Z sguilhen(a)redhat.com $
+$Revision: 76444 $
+-->
+
+<policy>
+ <!-- Used by clients within the application server VM such as
+ mbeans and servlets that access EJBs.
+ -->
+ <application-policy name="client-login">
+ <authentication>
+ <login-module code="org.jboss.security.ClientLoginModule"
+ flag="required">
+ <!-- Any existing security context will be restored on logout -->
+ <module-option name="restore-login-identity">true</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- Security domains for testing new jca framework -->
+ <application-policy name="HsqlDbRealm">
+ <authentication>
+ <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+ flag="required">
+ <module-option name="principal">sa</module-option>
+ <module-option name="userName">sa</module-option>
+ <module-option name="password"></module-option>
+ <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <application-policy name="JmsXARealm">
+ <authentication>
+ <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+ flag="required">
+ <module-option name="principal">guest</module-option>
+ <module-option name="userName">guest</module-option>
+ <module-option name="password">guest</module-option>
+ <module-option name="managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for HornetQ. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+<application-policy name="hornetq">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name = "unauthenticatedIdentity">guest</module-option>
+ <module-option name="usersProperties">props/hornetq-users.properties</module-option>
+ <module-option name="rolesProperties">props/hornetq-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for the jmx-console web application. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="jmx-console">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
+ <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for the web-console web application. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="web-console">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">web-console-users.properties</module-option>
+ <module-option name="rolesProperties">web-console-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!--
+ A template configuration for the JBossWS security domain.
+ This defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="JBossWS">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">props/jbossws-users.properties</module-option>
+ <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
+ <module-option name="unauthenticatedIdentity">anonymous</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- The default login configuration used by any security domain that
+ does not have a application-policy entry with a matching name
+ -->
+ <application-policy name="other">
+ <!-- A simple server login module, which can be used when the number
+ of users is relatively small. It uses two properties files:
+ users.properties, which holds users (key) and their password (value).
+ roles.properties, which holds users (key) and a comma-separated list of
+ their roles (value).
+ The unauthenticatedIdentity property defines the name of the principal
+ that will be used when a null username and password are presented as is
+ the case for an unuathenticated web client or MDB. If you want to
+ allow such users to be authenticated add the property, e.g.,
+ unauthenticatedIdentity="nobody"
+ -->
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required"/>
+ </authentication>
+ </application-policy>
+
+</policy>
Copied: trunk/src/config/jboss-as-5/non-clustered/hornetq-configuration.xml (from rev 9165, trunk/src/config/jboss-as/non-clustered/hornetq-configuration.xml)
===================================================================
--- trunk/src/config/jboss-as-5/non-clustered/hornetq-configuration.xml (rev 0)
+++ trunk/src/config/jboss-as-5/non-clustered/hornetq-configuration.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,93 @@
+<!--
+ ~ 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.
+ -->
+
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
+
+ <log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
+
+ <bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
+
+ <journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
+
+ <journal-min-files>10</journal-min-files>
+
+ <large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
+
+ <paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
+
+ <connectors>
+ <connector name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </connector>
+
+ <connector name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </connector>
+
+ <connector name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
+ <param key="server-id" value="${hornetq.server-id:0}"/>
+ </connector>
+
+ </connectors>
+
+ <acceptors>
+ <acceptor name="netty">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.port:5445}"/>
+ </acceptor>
+
+ <acceptor name="netty-throughput">
+ <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
+ <param key="host" value="${jboss.bind.address:localhost}"/>
+ <param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
+ <param key="batch-delay" value="50"/>
+ </acceptor>
+
+ <acceptor name="in-vm">
+ <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
+ <param key="server-id" value="0"/>
+ </acceptor>
+
+ </acceptors>
+
+ <security-settings>
+ <security-setting match="#">
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="send" roles="guest"/>
+ </security-setting>
+ </security-settings>
+
+ <address-settings>
+ <!--default for catch all-->
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <address-full-policy>BLOCK</address-full-policy>
+ </address-setting>
+ </address-settings>
+
+</configuration>
Copied: trunk/src/config/jboss-as-5/non-clustered/hornetq-jboss-beans.xml (from rev 9165, trunk/src/config/jboss-as/non-clustered/hornetq-jboss-beans.xml)
===================================================================
--- trunk/src/config/jboss-as-5/non-clustered/hornetq-jboss-beans.xml (rev 0)
+++ trunk/src/config/jboss-as-5/non-clustered/hornetq-jboss-beans.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- MBean server -->
+ <bean name="MBeanServer" class="javax.management.MBeanServer">
+ <constructor factoryClass="org.jboss.mx.util.MBeanServerLocator"
+ factoryMethod="locateJBoss"/>
+ </bean>
+
+ <!-- The core configuration -->
+ <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/>
+
+ <!-- The security manager -->
+ <bean name="HornetQSecurityManager" class="org.hornetq.integration.jboss.security.JBossASSecurityManager">
+ <depends>JBossSecurityJNDIContextEstablishment</depends>
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The core server -->
+ <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="Configuration"/>
+ </parameter>
+ <parameter>
+ <inject bean="MBeanServer"/>
+ </parameter>
+ <parameter>
+ <inject bean="HornetQSecurityManager"/>
+ </parameter>
+ </constructor>
+ <start ignored="true"/>
+ <stop ignored="true"/>
+ </bean>
+
+ <!-- The JMS server -->
+ <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
+ <constructor>
+ <parameter>
+ <inject bean="HornetQServer"/>
+ </parameter>
+ </constructor>
+ </bean>
+
+</deployment>
Copied: trunk/src/config/jboss-as-5/non-clustered/hornetq-jms.xml (from rev 9165, trunk/src/config/jboss-as/non-clustered/hornetq-jms.xml)
===================================================================
--- trunk/src/config/jboss-as-5/non-clustered/hornetq-jms.xml (rev 0)
+++ trunk/src/config/jboss-as-5/non-clustered/hornetq-jms.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,43 @@
+<configuration xmlns="urn:hornetq"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:hornetq /schema/hornetq-jms.xsd">
+
+ <connection-factory name="NettyConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="/ConnectionFactory"/>
+ <entry name="/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="NettyThroughputConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty-throughput"/>
+ </connectors>
+ <entries>
+ <entry name="/ThroughputConnectionFactory"/>
+ <entry name="/XAThroughputConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <connection-factory name="InVMConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ <entry name="java:/XAConnectionFactory"/>
+ </entries>
+ </connection-factory>
+
+ <queue name="DLQ">
+ <entry name="/queue/DLQ"/>
+ </queue>
+
+ <queue name="ExpiryQueue">
+ <entry name="/queue/ExpiryQueue"/>
+ </queue>
+
+</configuration>
Copied: trunk/src/config/jboss-as-5/non-clustered/hornetq-roles.properties (from rev 9165, trunk/src/config/jboss-as/non-clustered/hornetq-roles.properties)
===================================================================
--- trunk/src/config/jboss-as-5/non-clustered/hornetq-roles.properties (rev 0)
+++ trunk/src/config/jboss-as-5/non-clustered/hornetq-roles.properties 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,4 @@
+#
+# user=role1,role2,...
+#
+guest=guest
Copied: trunk/src/config/jboss-as-5/non-clustered/hornetq-users.properties (from rev 9165, trunk/src/config/jboss-as/non-clustered/hornetq-users.properties)
===================================================================
--- trunk/src/config/jboss-as-5/non-clustered/hornetq-users.properties (rev 0)
+++ trunk/src/config/jboss-as-5/non-clustered/hornetq-users.properties 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,4 @@
+#
+# user=password
+#
+guest=guest
Copied: trunk/src/config/jboss-as-5/non-clustered/jms-ds.xml (from rev 9165, trunk/src/config/jboss-as/non-clustered/jms-ds.xml)
===================================================================
--- trunk/src/config/jboss-as-5/non-clustered/jms-ds.xml (rev 0)
+++ trunk/src/config/jboss-as-5/non-clustered/jms-ds.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,26 @@
+<connection-factories>
+ <!--
+ JMS Stuff
+ -->
+
+ <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="hornetq:service=JMSProviderLoader,name=JMSProvider">
+ <attribute name="ProviderName">DefaultJMSProvider</attribute>
+ <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>
+ <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
+ <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
+ </mbean>
+ <!--
+ JMS XA Resource adapter, use this to get transacted JMS in beans
+ -->
+ <tx-connection-factory>
+ <jndi-name>JmsXA</jndi-name>
+ <xa-transaction/>
+ <rar-name>hornetq-ra.rar</rar-name>
+ <connection-definition>org.hornetq.ra.HornetQRAConnectionFactory</connection-definition>
+ <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
+ <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
+ <max-pool-size>20</max-pool-size>
+ <security-domain-and-application>JmsXARealm</security-domain-and-application>
+ </tx-connection-factory>
+</connection-factories>
Copied: trunk/src/config/jboss-as-5/non-clustered/login-config.xml (from rev 9165, trunk/src/config/jboss-as/non-clustered/login-config.xml)
===================================================================
--- trunk/src/config/jboss-as-5/non-clustered/login-config.xml (rev 0)
+++ trunk/src/config/jboss-as-5/non-clustered/login-config.xml 2010-04-26 14:08:48 UTC (rev 9166)
@@ -0,0 +1,146 @@
+<?xml version='1.0'?>
+
+<!-- The XML based JAAS login configuration read by the
+org.jboss.security.auth.login.XMLLoginConfig mbean. Add
+an application-policy element for each security domain.
+
+The outline of the application-policy is:
+<application-policy name="security-domain-name">
+ <authentication>
+ <login-module code="login.module1.class.name" flag="control_flag">
+ <module-option name = "option1-name">option1-value</module-option>
+ <module-option name = "option2-name">option2-value</module-option>
+ ...
+ </login-module>
+
+ <login-module code="login.module2.class.name" flag="control_flag">
+ ...
+ </login-module>
+ ...
+ </authentication>
+</application-policy>
+
+$Id: login-config.xml 76444 2008-07-29 23:50:53Z sguilhen(a)redhat.com $
+$Revision: 76444 $
+-->
+
+<policy>
+ <!-- Used by clients within the application server VM such as
+ mbeans and servlets that access EJBs.
+ -->
+ <application-policy name="client-login">
+ <authentication>
+ <login-module code="org.jboss.security.ClientLoginModule"
+ flag="required">
+ <!-- Any existing security context will be restored on logout -->
+ <module-option name="restore-login-identity">true</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- Security domains for testing new jca framework -->
+ <application-policy name="HsqlDbRealm">
+ <authentication>
+ <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+ flag="required">
+ <module-option name="principal">sa</module-option>
+ <module-option name="userName">sa</module-option>
+ <module-option name="password"></module-option>
+ <module-option name="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <application-policy name="JmsXARealm">
+ <authentication>
+ <login-module code="org.jboss.resource.security.ConfiguredIdentityLoginModule"
+ flag="required">
+ <module-option name="principal">guest</module-option>
+ <module-option name="userName">guest</module-option>
+ <module-option name="password">guest</module-option>
+ <module-option name="managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for hornetq. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+<application-policy name="hornetq">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name = "unauthenticatedIdentity">guest</module-option>
+ <module-option name="usersProperties">props/hornetq-users.properties</module-option>
+ <module-option name="rolesProperties">props/hornetq-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for the jmx-console web application. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="jmx-console">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">props/jmx-console-users.properties</module-option>
+ <module-option name="rolesProperties">props/jmx-console-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- A template configuration for the web-console web application. This
+ defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="web-console">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">web-console-users.properties</module-option>
+ <module-option name="rolesProperties">web-console-roles.properties</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!--
+ A template configuration for the JBossWS security domain.
+ This defaults to the UsersRolesLoginModule the same as other and should be
+ changed to a stronger authentication mechanism as required.
+ -->
+ <application-policy name="JBossWS">
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required">
+ <module-option name="usersProperties">props/jbossws-users.properties</module-option>
+ <module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
+ <module-option name="unauthenticatedIdentity">anonymous</module-option>
+ </login-module>
+ </authentication>
+ </application-policy>
+
+ <!-- The default login configuration used by any security domain that
+ does not have a application-policy entry with a matching name
+ -->
+ <application-policy name="other">
+ <!-- A simple server login module, which can be used when the number
+ of users is relatively small. It uses two properties files:
+ users.properties, which holds users (key) and their password (value).
+ roles.properties, which holds users (key) and a comma-separated list of
+ their roles (value).
+ The unauthenticatedIdentity property defines the name of the principal
+ that will be used when a null username and password are presented as is
+ the case for an unuathenticated web client or MDB. If you want to
+ allow such users to be authenticated add the property, e.g.,
+ unauthenticatedIdentity="nobody"
+ -->
+ <authentication>
+ <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
+ flag="required"/>
+ </authentication>
+ </application-policy>
+
+</policy>
14 years
JBoss hornetq SVN: r9165 - trunk/docs/user-manual/en.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2010-04-26 09:27:05 -0400 (Mon, 26 Apr 2010)
New Revision: 9165
Modified:
trunk/docs/user-manual/en/interoperability.xml
Log:
doc: moved StompConnect section after native Stomp doc
Modified: trunk/docs/user-manual/en/interoperability.xml
===================================================================
--- trunk/docs/user-manual/en/interoperability.xml 2010-04-26 13:18:12 UTC (rev 9164)
+++ trunk/docs/user-manual/en/interoperability.xml 2010-04-26 13:27:05 UTC (rev 9165)
@@ -45,23 +45,7 @@
(it will be ignored if its <literal>transaction</literal> header is set).</para>
</section>
</section>
- <section id="stompconnect">
- <title>StompConnect</title>
- <para><ulink url="http://stomp.codehaus.org/StompConnect">StompConnect</ulink> is a server that
- can act as a Stomp broker and proxy the Stomp protocol to the standard JMS API.
- Consequently, using StompConnect it is possible to turn HornetQ into a Stomp Broker and
- use any of the available stomp clients. These include clients written in C, C++, c# and
- .net etc.</para>
- <para>To run StompConnect first start the HornetQ server and make sure that it is using
- JNDI.</para>
- <para>Stomp requires the file <literal>jndi.properties</literal> to be available on the
- classpath. This should look something like:</para>
- <programlisting>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
-java.naming.provider.url=jnp://localhost:1099
-java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</programlisting>
- <para>Make sure this file is in the classpath along with the StompConnect jar and the
- HornetQ jars and simply run <literal>java org.codehaus.stomp.jms.Main</literal>.</para>
- </section>
+
<section>
<title>Mapping Stomp destinations to HornetQ addresses and queues</title>
<para>Stomp clients deals with <emphasis>destinations</emphasis> when sending messages and subscribing.
@@ -124,6 +108,25 @@
</programlisting>
</section>
</section>
+
+ <section id="stompconnect">
+ <title>StompConnect</title>
+ <para><ulink url="http://stomp.codehaus.org/StompConnect">StompConnect</ulink> is a server that
+ can act as a Stomp broker and proxy the Stomp protocol to the standard JMS API.
+ Consequently, using StompConnect it is possible to turn HornetQ into a Stomp Broker and
+ use any of the available stomp clients. These include clients written in C, C++, c# and
+ .net etc.</para>
+ <para>To run StompConnect first start the HornetQ server and make sure that it is using
+ JNDI.</para>
+ <para>Stomp requires the file <literal>jndi.properties</literal> to be available on the
+ classpath. This should look something like:</para>
+ <programlisting>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</programlisting>
+ <para>Make sure this file is in the classpath along with the StompConnect jar and the
+ HornetQ jars and simply run <literal>java org.codehaus.stomp.jms.Main</literal>.</para>
+ </section>
+
</section>
<section>
<title>REST</title>
14 years
JBoss hornetq SVN: r9164 - in trunk: src/main/org/hornetq/jms/client and 1 other directories.
by do-not-reply@jboss.org
Author: jmesnil
Date: 2010-04-26 09:18:12 -0400 (Mon, 26 Apr 2010)
New Revision: 9164
Added:
trunk/tests/src/org/hornetq/tests/integration/jms/cluster/TemporaryQueueClusterTest.java
Modified:
trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
trunk/src/main/org/hornetq/jms/client/HornetQSession.java
Log:
https://jira.jboss.org/jira/browse/HORNETQ-286: Temporary Queue not accessible on remote node
* use bindinqQuery() to check if the JMS Destination has bindings on the server before creating producer or consumer
* bindingQuery() returns both local and remote queue bindings for the given address
* added TemporaryQueueClusterTest to check JMS temporary queue behavior
Modified: trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2010-04-26 12:51:27 UTC (rev 9163)
+++ trunk/src/main/org/hornetq/core/server/impl/ServerSessionImpl.java 2010-04-26 13:18:12 UTC (rev 9164)
@@ -498,11 +498,17 @@
List<SimpleString> names = new ArrayList<SimpleString>();
+ // make an exception for the management address (see HORNETQ-29)
+ if (address.equals(managementAddress))
+ {
+ return new BindingQueryResult(true, names);
+ }
+
Bindings bindings = postOffice.getMatchingBindings(address);
for (Binding binding : bindings.getBindings())
{
- if (binding.getType() == BindingType.LOCAL_QUEUE)
+ if (binding.getType() == BindingType.LOCAL_QUEUE || binding.getType() == BindingType.REMOTE_QUEUE)
{
names.add(binding.getUniqueName());
}
Modified: trunk/src/main/org/hornetq/jms/client/HornetQSession.java
===================================================================
--- trunk/src/main/org/hornetq/jms/client/HornetQSession.java 2010-04-26 12:51:27 UTC (rev 9163)
+++ trunk/src/main/org/hornetq/jms/client/HornetQSession.java 2010-04-26 13:18:12 UTC (rev 9164)
@@ -322,23 +322,11 @@
if (jbd != null)
{
- if (jbd.isQueue())
- {
- QueueQuery response = session.queueQuery(jbd.getSimpleAddress());
+ BindingQuery response = session.bindingQuery(jbd.getSimpleAddress());
- if (!response.isExists())
- {
- throw new InvalidDestinationException("Queue " + jbd.getName() + " does not exist");
- }
- }
- else
+ if (!response.isExists())
{
- BindingQuery response = session.bindingQuery(jbd.getSimpleAddress());
-
- if (!response.isExists())
- {
- throw new InvalidDestinationException("Topic " + jbd.getName() + " does not exist");
- }
+ throw new InvalidDestinationException("Destination " + jbd.getName() + " does not exist");
}
}
@@ -525,7 +513,7 @@
if (dest.isQueue())
{
- QueueQuery response = session.queueQuery(dest.getSimpleAddress());
+ BindingQuery response = session.bindingQuery(dest.getSimpleAddress());
if (!response.isExists())
{
Added: trunk/tests/src/org/hornetq/tests/integration/jms/cluster/TemporaryQueueClusterTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/jms/cluster/TemporaryQueueClusterTest.java (rev 0)
+++ trunk/tests/src/org/hornetq/tests/integration/jms/cluster/TemporaryQueueClusterTest.java 2010-04-26 13:18:12 UTC (rev 9164)
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2010 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.hornetq.tests.integration.jms.cluster;
+
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+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 javax.jms.Topic;
+
+import org.hornetq.tests.util.JMSClusteredTestBase;
+
+/**
+ * A TopicClusterTest
+ *
+ * @author <mailto:clebert.suconic@jboss.org">Clebert Suconic</a>
+ *
+ *
+ */
+public class TemporaryQueueClusterTest extends JMSClusteredTestBase
+{
+
+ // Constants -----------------------------------------------------
+
+ // Attributes ----------------------------------------------------
+
+ // Static --------------------------------------------------------
+
+ // Constructors --------------------------------------------------
+
+ // Public --------------------------------------------------------
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ public void testTemporaryQueue() throws Exception
+ {
+ jmsServer1.createQueue(false, "target", null, false, "/queue/target");
+ jmsServer2.createQueue(false, "target", null, false, "/queue/target");
+
+ Connection conn1 = cf1.createConnection();
+ Connection conn2 = cf2.createConnection();
+
+ conn1.start();
+ conn2.start();
+
+ try
+ {
+ Session session1 = conn1.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ Queue targetQueue1 = session1.createQueue("target");
+ Queue tempQueue = session1.createTemporaryQueue();
+ System.out.println("temp queue is " + tempQueue.getQueueName());
+ Session session2 = conn2.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ Queue targetQueue2 = session2.createQueue("target");
+
+ // sleep a little bit to have the temp queue propagated to server #2
+ Thread.sleep(3000);
+ MessageProducer prod1 = session1.createProducer(targetQueue1);
+ MessageConsumer cons2 = session2.createConsumer(targetQueue2);
+ MessageConsumer tempCons1 = session1.createConsumer(tempQueue);
+
+ for (int i = 0; i < 10; i++)
+ {
+ TextMessage message = session1.createTextMessage("" + i);
+ message.setJMSReplyTo(tempQueue);
+ prod1.send(message);
+ }
+
+ for (int i = 0; i < 10; i++)
+ {
+ if (i % 2 == 0)
+ {
+ TextMessage received = (TextMessage)cons2.receive(5000);
+ System.out.println(received.getText());
+ System.out.println("check temp queue on server #2");
+ MessageProducer tempProducer = session2.createProducer(received.getJMSReplyTo());
+ tempProducer.send(session2.createTextMessage(">>> " + received.getText()));
+ tempProducer.close();
+ }
+ }
+
+ for (int i = 0; i < 10; i++)
+ {
+ if (i % 2 == 0)
+ {
+ TextMessage received = (TextMessage)tempCons1.receive(5000);
+ System.out.println(received.getText());
+ }
+ }
+ }
+ finally
+ {
+ conn1.close();
+ conn2.close();
+ }
+
+ jmsServer1.destroyQueue("target");
+ jmsServer2.destroyQueue("target");
+
+ }
+
+ // Package protected ---------------------------------------------
+
+ // Protected -----------------------------------------------------
+
+ // Private -------------------------------------------------------
+
+ // Inner classes -------------------------------------------------
+
+}
14 years
JBoss hornetq SVN: r9163 - branches/HnetQ_323_cn/docs/user-manual/zh.
by do-not-reply@jboss.org
Author: gaohoward
Date: 2010-04-26 08:51:27 -0400 (Mon, 26 Apr 2010)
New Revision: 9163
Modified:
branches/HnetQ_323_cn/docs/user-manual/zh/client-reconnection.xml
Log:
done
Modified: branches/HnetQ_323_cn/docs/user-manual/zh/client-reconnection.xml
===================================================================
--- branches/HnetQ_323_cn/docs/user-manual/zh/client-reconnection.xml 2010-04-26 09:20:10 UTC (rev 9162)
+++ branches/HnetQ_323_cn/docs/user-manual/zh/client-reconnection.xml 2010-04-26 12:51:27 UTC (rev 9163)
@@ -17,104 +17,73 @@
<!-- permitted by applicable law. -->
<!-- ============================================================================= -->
<chapter id="client-reconnection">
- <title>Client Reconnection and Session Reattachment</title>
- <para>HornetQ clients can be configured to automatically reconnect or re-attach to the server in
- the event that a failure is detected in the connection between the client and the server. </para>
+ <title>客户端重新连接与会话恢复</title>
+ <para>通过配置,HornetQ的客户端在与服务器的连接出现故障时,可以自动地重新建立连接并恢复与服务器的通迅。</para>
<section>
- <title>100% Transparent session re-attachment</title>
- <para>If the failure was due to some transient failure such as a temporary network failure,
- and the target server was not restarted, then the sessions will still be existent on the
- server, asssuming the client hasn't been disconnected for more than connection-ttl <xref
- linkend="connection-ttl"/>.</para>
- <para>In this scenario, HornetQ will automatically re-attach the client sessions to the
- server sessions when the connection reconnects. This is done 100% transparently and the
- client can continue exactly as if nothing had happened.</para>
- <para>The way this works is as follows:</para>
- <para>As HornetQ clients send commands to their servers they store each sent command in an
- in-memory buffer. In the case that connection failure occurs and the client subsequently
- reattaches to the same server, as part of the reattachment protocol the server informs
- the client during reattachment with the id of the last command it successfully received
- from that client.</para>
- <para>If the client has sent more commands than were received before failover it can replay
- any sent commands from its buffer so that the client and server can reconcile their
- states.</para>
- <para>The size of this buffer is configured by the <literal>ConfirmationWindowSize</literal>
- parameter, when the server has received <literal>ConfirmationWindowSize</literal> bytes
- of commands and processed them it will send back a command confirmation to the client,
- and the client can then free up space in the buffer.</para>
- <para>If you are using JMS and you're using the JMS service on the server to load your JMS
- connection factory instances into JNDI then this parameter can be configured in <literal
- >hornetq-jms.xml</literal> using the element <literal
- >confirmation-window-size</literal> a. If you're using JMS but not using JNDI then
- you can set these values directly on the <literal>HornetQConnectionFactory</literal>
- instance using the appropriate setter method.</para>
- <para>If you're using core you can set these values directly on the <literal
- >ClientSessionFactory</literal> instance using the appropriate setter method.</para>
- <para>The window is specified in bytes, and has a default value of <literal
- >1MiB</literal>.</para>
- <para>Setting this parameter to <literal>-1</literal> disables any buffering and prevents
- any re-attachment from occurring, forcing reconnect instead. The default value for this
- parameter is <literal>-1</literal>.</para>
+ <title>100%透明的会话恢复(re-attachment)</title>
+ <para>如果网络出现暂时性连接故障,并且服务器没有重启的情况下,当前的会话还会存在服务器中,其状态如同客户端
+ 没有断开超过连接TTL<xref linkend="connection-ttl"/>时间。</para>
+ <para>在这种情况下,当客户端重新连接上服务器后,HornetQ自动将客户端和会话与服务器端的会话重新连接起来。整个过程
+ 对于客户端是完全透明的,在客户端就好像什么都没有发生一样。</para>
+ <para>具体工作原理如下:</para>
+ <para>客户端再向服务器发送命令时,它将每个命令保存到内存的一块缓存中。当连接出现故障时客户端会尝试与该服务
+ 器恢复会话。做为恢复协议的一部分,服务器在会话恢复时通知客户端最后一个成功接收的命令id。</para>
+ <para>根据这个命令id,客户端可以判断它的缓存中是否有命令还未被服务器成功接收。如果有,客户端可以重新发送
+ 这些命令。</para>
+ <para>缓存的大小由<literal>ConfirmationWindowSize</literal>参数决定。当服务器成功接收了
+ <literal>ConfirmationWindowSize</literal>字节的命令时,会向客户端发送一个命令确认,以使客户端
+ 及时清除缓存。</para>
+ <para>如果使用JMS服务,并且JMS的连接工厂是注册到JNDI的话,相应的参数是<literal
+ >hornetq-jms.xml</literal>文件中的<literal
+ >confirmation-window-size</literal>项。如果你并不将JMS连接工厂注册到JNDI,则你需要在
+ <literal>HornetQConnectionFactory</literal>上使用相应的方法直接设置该参数。</para>
+ <para>如果使用核心服务,你可以直接在<literal>ClientSessionFactory</literal>实例上直接设置该参数。</para>
+ <para>参数的单位是字节,默认值是<literal>1MiB</literal>。</para>
+ <para>如果该参数是值设为<literal>-1</literal>,则关闭缓存,即关闭了重新恢复功能,迫使进行重新连接。默认
+ 值是<literal>-1</literal>。</para>
</section>
<section>
- <title>Session reconnection</title>
- <para>Alternatively, the server might have actually been restarted after crashing or being
- stopped. In this case any sessions will no longer be existent on the server and it won't
- be possible to 100% transparently re-attach to them.</para>
- <para>In this case, HornetQ will automatically reconnect the connection and <emphasis
- role="italic">recreate</emphasis> any sessions and consumers on the server
- corresponding to the sessions and consumers on the client. This process is exactly the
- same as what happens during failover onto a backup server.</para>
- <para>Client reconnection is also used internally by components such as core bridges to
- allow them to reconnect to their target servers.</para>
- <para>Please see the section on failover <xref linkend="ha.automatic.failover"/> to get a
- full understanding of how transacted and non-transacted sessions are reconnected during
- failover/reconnect and what you need to do to maintain <emphasis role="italic">once and
- only once </emphasis>delivery guarantees.</para>
+ <title>会话重新连接</title>
+ <para>有时服务器发生故障后进行了重启。这时服务器将丢失所有当前的会话,上面所述的会话恢复就不能做到完全透明了。</para>
+ <para>在这种情况下,HornetQ自动地重新建立连接并<emphasis role="italic">重新创建</emphasis>会话
+ 和接收者。这一过程与向备份服务器进行失效备援(failover)完全一样。</para>
+ <para>客户重新连接的功能还用在其它一些模块上,如核心桥,以使它们能够重新连接到目标服务器上。</para>
+ <para>要全面理解事务性会话和非事务性会话在失效备援/重连接情况下的细节,以及如何保证<emphasis role="italic">
+ 一次并且只有一次</emphasis>的消息传递,请参见<xref linkend="ha.automatic.failover"/>的有关内容。</para>
</section>
<section>
- <title>Configuring reconnection/reattachment attributes</title>
- <para>Client reconnection is configured using the following parameters:</para>
+ <title>重新连接/会话恢复的配置参数</title>
+ <para>下面是客户端用于重新连接的参数:</para>
<itemizedlist>
<listitem>
- <para><literal>retry-interval</literal>. This optional parameter determines the
- period in milliseconds between subsequent reconnection attempts, if the
- connection to the target server has failed. The default value is <literal
- >2000</literal> milliseconds.</para>
+ <para><literal>retry-interval</literal>。可选参数。它决定了两次重新连接尝试间隔的时间。单位
+ 是毫秒。默认值是<literal>2000</literal>毫秒。</para>
</listitem>
<listitem>
- <para><literal>retry-interval-multiplier</literal>. This optional parameter
- determines determines a multiplier to apply to the time since the last retry to
- compute the time to the next retry.</para>
- <para>This allows you to implement an <emphasis>exponential backoff</emphasis>
- between retry attempts.</para>
- <para>Let's take an example:</para>
- <para>If we set <literal>retry-interval</literal> to <literal>1000</literal> ms and
- we set <literal>retry-interval-multiplier</literal> to <literal>2.0</literal>,
- then, if the first reconnect attempt fails, we will wait <literal>1000</literal>
- ms then <literal>2000</literal> ms then <literal>4000</literal> ms between
- subsequent reconnection attempts.</para>
- <para>The default value is <literal>1.0</literal> meaning each reconnect attempt is
- spaced at equal intervals.</para>
+ <para><literal>retry-interval-multiplier</literal>。可选参数。它表示下一次重试时间间隔的
+ 系数。即下一次重试的时间间隔是本次时间间隔乘以该参数。</para>
+ <para>这样可以实现重试间隔的<emphasis>指数延迟(exponential backoff)</emphasis>。</para>
+ <para>让我们看一个例子:</para>
+ <para>假设<literal>retry-interval</literal>为<literal>1000</literal> ms,并且我们
+ 将<literal>retry-interval-multiplier</literal>设为<literal>2.0</literal>,如果
+ 第一次尝试失败,则等待<literal>1000</literal>毫秒后进行第二次重试,如果再失败,则每三次重
+ 试要在<literal>2000</literal>毫秒后进行,第四次要等待<literal>4000</literal>毫秒,
+ 以此类推。</para>
+ <para>默认值是<literal>1.0</literal>,表示每次重试间隔相同的时间。</para>
</listitem>
<listitem>
- <para><literal>max-retry-interval</literal>. This optional parameter determines the
- maximum retry interval that will be used. When setting <literal
- >retry-interval-multiplier</literal> it would otherwise be possible that
- subsequent retries exponentially increase to ridiculously large values. By
- setting this parameter you can set an upper limit on that value. The default
- value is <literal>2000</literal> milliseconds.</para>
+ <para><literal>max-retry-interval</literal>。可选参数。它决定了重试间的最大时间间隔。
+ 使用<literal>retry-interval-multiplier</literal>可以使重试的时间间隔以指数级增加。
+ 有可能造成时间间隔增加到一个非常大的数值。通过设置一个最大值可对其增长进行限制。默认
+ 值是<literal>2000</literal>毫秒。</para>
</listitem>
<listitem>
- <para><literal>reconnect-attempts</literal>. This optional parameter determines the
- total number of reconnect attempts to make before giving up and shutting down. A
- value of <literal>-1</literal> signifies an unlimited number of attempts. The
- default value is <literal>0</literal>.</para>
+ <para><literal>reconnect-attempts</literal>。可先参数。它表示要进行多少重试后才放弃
+ 并退出。<literal>-1</literal>表示进行无限次重试。默认值是<literal>0</literal>。</para>
</listitem>
</itemizedlist>
- <para>If you're using JMS, and you're using the JMS Service on the server to load your JMS
- connection factory instances directly into JNDI, then you can specify these parameters
- in the xml configuration in <literal>hornetq-jms.xml</literal>, for example:</para>
+ <para>如果使用JMS并且将JMS的连接工厂绑定到JNDI服务中,则需要在<literal>hornetq-jms.xml</literal>
+ 文件中对这些参数进行配置,如下例所示:</para>
<programlisting>
<connection-factory name="ConnectionFactory">
<connectors>
@@ -130,23 +99,18 @@
<reconnect-attempts>1000</reconnect-attempts>
</connection-factory>
</programlisting>
- <para>If you're using JMS, but instantiating your JMS connection factory directly, you can
- specify the parameters using the appropriate setter methods on the <literal
- >HornetQConnectionFactory</literal> immediately after creating it.</para>
- <para>If you're using the core API and instantiating the <literal
- >ClientSessionFactory</literal> instance directly you can also specify the
- parameters using the appropriate setter methods on the <literal
- >ClientSessionFactory</literal> immediately after creating it.</para>
- <para>If your client does manage to reconnect but the session is no longer available on the
- server, for instance if the server has been restarted or it has timed out, then the
- client won't be able to re-attach, and any <literal>ExceptionListener</literal> or
- <literal>FailureListener</literal> instances registered on the connection or session
- will be called.</para>
+ <para>如果使用JMS但是直接实例化JMS连接工厂,你可以使用适当的方法在 <literal
+ >HornetQConnectionFactory</literal> 对象上直接设置这些参数。</para>
+ <para>如果使用核心接口直接创建 <literal
+ >ClientSessionFactory</literal>实例,则用它的适当的方法可以设置这些参数。</para>
+ <para>如果客户端重新连接后发现会话已经丢失(如服务器重启或超时),则无法完成恢复。如果在连接上或会话上注册了
+ <literal>ExceptionListener</literal>或<literal>FailureListener</literal>,
+ 它们将会被通知。</para>
</section>
<section id="client-reconnection.exceptionlistener">
<title>ExceptionListeners and SessionFailureListeners</title>
- <para>Please note, that when a client reconnects or re-attaches, any registered JMS <literal
- >ExceptionListener</literal> or core API <literal>SessionFailureListener</literal>
- will be called.</para>
+ <para>请注意当客户端进行重新连接或恢复会话时,注册的JMS <literal
+ >ExceptionListener</literal> 或核心接口的 <literal>SessionFailureListener</literal>
+ 将会被调用。</para>
</section>
</chapter>
14 years
JBoss hornetq SVN: r9162 - trunk/src/config/common.
by do-not-reply@jboss.org
Author: timfox
Date: 2010-04-26 05:20:10 -0400 (Mon, 26 Apr 2010)
New Revision: 9162
Modified:
trunk/src/config/common/hornetq-version.properties
Log:
increased version
Modified: trunk/src/config/common/hornetq-version.properties
===================================================================
--- trunk/src/config/common/hornetq-version.properties 2010-04-26 09:16:13 UTC (rev 9161)
+++ trunk/src/config/common/hornetq-version.properties 2010-04-26 09:20:10 UTC (rev 9162)
@@ -1,8 +1,8 @@
-hornetq.version.versionName=Blue Belt Hornet
+hornetq.version.versionName=Hungry Hornet
hornetq.version.majorVersion=2
hornetq.version.minorVersion=1
hornetq.version.microVersion=0
-hornetq.version.incrementingVersion=116
-hornetq.version.versionSuffix=BETA2
-hornetq.version.versionTag=BETA2
+hornetq.version.incrementingVersion=117
+hornetq.version.versionSuffix=CR1
+hornetq.version.versionTag=CR1
hornetq.netty.version=(a)NETTY.VERSION@
14 years