JBoss hornetq SVN: r8586 - in trunk: src/main/org/hornetq/core/replication/impl and 3 other directories.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2009-12-06 01:58:34 -0500 (Sun, 06 Dec 2009)
New Revision: 8586
Modified:
trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
trunk/src/main/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/paging/PageCrashTest.java
Log:
Fixed bug with duplicate detection on depage and transactional send
Modified: trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java 2009-12-05 19:37:17 UTC (rev 8585)
+++ trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java 2009-12-06 06:58:34 UTC (rev 8586)
@@ -49,6 +49,7 @@
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.core.transaction.Transaction;
import org.hornetq.core.transaction.TransactionPropertyIndexes;
+import org.hornetq.core.transaction.Transaction.State;
import org.hornetq.core.transaction.impl.TransactionImpl;
import org.hornetq.utils.SimpleString;
@@ -282,7 +283,7 @@
}
public void addSize(final ServerMessage message, final boolean add)
- {
+ {
long size = message.getMemoryEstimate();
if (add)
@@ -302,7 +303,7 @@
public void addSize(final MessageReference reference, final boolean add)
{
long size = MessageReferenceImpl.getMemoryEstimate();
-
+
if (add)
{
checkReleaseProducerFlowControlCredits(size);
@@ -400,9 +401,9 @@
if (running)
{
running = false;
-
+
final CountDownLatch latch = new CountDownLatch(1);
-
+
executor.execute(new Runnable()
{
public void run()
@@ -410,10 +411,10 @@
latch.countDown();
}
});
-
+
if (!latch.await(60, TimeUnit.SECONDS))
{
- log.warn("Timed out on waiting PagingStore " + this.address + " to shutdown");
+ log.warn("Timed out on waiting PagingStore " + this.address + " to shutdown");
}
if (currentPage != null)
@@ -726,7 +727,7 @@
}
}
- private void addSize(final long size)
+ private void addSize(final long size)
{
if (addressFullMessagePolicy != AddressFullMessagePolicy.PAGE)
{
@@ -948,55 +949,67 @@
final long transactionIdDuringPaging = pagedMessage.getTransactionID();
+ postOffice.route(message, depageTransaction);
+
+ // This means the page is duplicated. So we need to ignore this
+ if (depageTransaction.getState() == State.ROLLBACK_ONLY)
+ {
+ break;
+ }
+
+ PageTransactionInfo pageUserTransaction = null;
+
if (transactionIdDuringPaging >= 0)
{
- final PageTransactionInfo pageTransactionInfo = pagingManager.getTransaction(transactionIdDuringPaging);
+ pageUserTransaction = pagingManager.getTransaction(transactionIdDuringPaging);
- if (pageTransactionInfo == null)
+ if (pageUserTransaction == null)
{
- log.warn("Transaction " + pagedMessage.getTransactionID() +
- " used during paging not found, ignoring message " +
- message);
+ // This is not supposed to happen
+ log.warn("Transaction " + pagedMessage.getTransactionID() + " used during paging not found");
continue;
}
+ else
+ {
- // This is to avoid a race condition where messages are depaged
- // before the commit arrived
+ // This is to avoid a race condition where messages are depaged
+ // before the commit arrived
- while (running && !pageTransactionInfo.waitCompletion(500))
- {
- // This is just to give us a chance to interrupt the process..
- // if we start a shutdown in the middle of transactions, the commit/rollback may never come, delaying
- // the shutdown of the server
- if (isTrace)
+ while (running && !pageUserTransaction.waitCompletion(500))
{
- trace("Waiting pageTransaction to complete");
+ // This is just to give us a chance to interrupt the process..
+ // if we start a shutdown in the middle of transactions, the commit/rollback may never come, delaying
+ // the shutdown of the server
+ if (isTrace)
+ {
+ trace("Waiting pageTransaction to complete");
+ }
}
- }
- if (!running)
- {
- break;
- }
+ if (!running)
+ {
+ break;
+ }
- if (!pageTransactionInfo.isCommit())
- {
- if (isTrace)
+ if (!pageUserTransaction.isCommit())
{
- trace("Rollback was called after prepare, ignoring message " + message);
+ if (isTrace)
+ {
+ trace("Rollback was called after prepare, ignoring message " + message);
+ }
+ continue;
}
- continue;
}
- // Update information about transactions
- if (message.isDurable())
- {
- pageTransactionInfo.decrement();
- pageTransactionsToUpdate.add(pageTransactionInfo);
- }
}
- postOffice.route(message, depageTransaction);
+ // Update information about transactions
+ // This needs to be done after routing because of duplication detection
+ if (pageUserTransaction != null && message.isDurable())
+ {
+ pageUserTransaction.decrement();
+ pageTransactionsToUpdate.add(pageUserTransaction);
+ }
}
if (!running)
@@ -1023,7 +1036,7 @@
}
depageTransaction.commit();
-
+
storageManager.waitOnOperations();
if (isTrace)
Modified: trunk/src/main/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java 2009-12-05 19:37:17 UTC (rev 8585)
+++ trunk/src/main/org/hornetq/core/replication/impl/ReplicationEndpointImpl.java 2009-12-06 06:58:34 UTC (rev 8586)
@@ -95,6 +95,9 @@
private final ConcurrentMap<SimpleString, ConcurrentMap<Integer, Page>> pageIndex = new ConcurrentHashMap<SimpleString, ConcurrentMap<Integer, Page>>();
private final ConcurrentMap<Long, LargeServerMessage> largeMessages = new ConcurrentHashMap<Long, LargeServerMessage>();
+
+ // Used on tests, to simulate failures on delete pages
+ private boolean deletePages = true;
// Constructors --------------------------------------------------
public ReplicationEndpointImpl(final HornetQServer server)
@@ -285,6 +288,12 @@
}
}
+
+ /** Used on tests only. To simulate missing page deletes*/
+ public void setDeletePages(final boolean deletePages)
+ {
+ this.deletePages = deletePages;
+ }
/**
* @param journalInformation
@@ -504,7 +513,10 @@
{
if (packet.isDelete())
{
- page.delete();
+ if (deletePages)
+ {
+ page.delete();
+ }
}
else
{
Modified: trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-05 19:37:17 UTC (rev 8585)
+++ trunk/src/main/org/hornetq/core/server/impl/HornetQServerImpl.java 2009-12-06 06:58:34 UTC (rev 8586)
@@ -854,6 +854,12 @@
// Public
// ---------------------------------------------------------------------------------------
+ /** For tests only */
+ public ReplicationEndpoint getReplicationEndpoint()
+ {
+ return this.replicationEndpoint;
+ }
+
// Package protected
// ----------------------------------------------------------------------------
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java 2009-12-05 19:37:17 UTC (rev 8585)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/PagingFailoverTest.java 2009-12-06 06:58:34 UTC (rev 8586)
@@ -17,7 +17,6 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import org.hornetq.core.buffers.HornetQBuffers;
import org.hornetq.core.client.ClientConsumer;
import org.hornetq.core.client.ClientMessage;
import org.hornetq.core.client.ClientProducer;
@@ -29,7 +28,9 @@
import org.hornetq.core.config.TransportConfiguration;
import org.hornetq.core.exception.HornetQException;
import org.hornetq.core.remoting.RemotingConnection;
+import org.hornetq.core.replication.impl.ReplicationEndpointImpl;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.impl.HornetQServerImpl;
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.utils.SimpleString;
@@ -120,10 +121,20 @@
session.commit();
+ ReplicationEndpointImpl endpoint = null;
+
if (failBeforeConsume)
{
failSession(session, latch);
}
+ else
+ {
+ endpoint = (ReplicationEndpointImpl)((HornetQServerImpl)server1Service).getReplicationEndpoint();
+ if (endpoint != null)
+ {
+ endpoint.setDeletePages(false);
+ }
+ }
session.start();
@@ -145,6 +156,11 @@
session.commit();
+ if (endpoint != null)
+ {
+ endpoint.setDeletePages(true);
+ }
+
if (!failBeforeConsume)
{
failSession(session, latch);
Modified: trunk/tests/src/org/hornetq/tests/integration/paging/PageCrashTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/paging/PageCrashTest.java 2009-12-05 19:37:17 UTC (rev 8585)
+++ trunk/tests/src/org/hornetq/tests/integration/paging/PageCrashTest.java 2009-12-06 06:58:34 UTC (rev 8586)
@@ -69,18 +69,31 @@
public void testCrashDuringDeleteFile() throws Exception
{
- pageAndFail();
+ doTestCrashDuringDeleteFile(false);
+ }
+ public void testCrashDuringDeleteFileTransacted() throws Exception
+ {
+ doTestCrashDuringDeleteFile(true);
+ }
+
+ public void doTestCrashDuringDeleteFile(final boolean transacted) throws Exception
+ {
+ pageAndFail(transacted);
+
File pageDir = new File(getPageDir());
File directories[] = pageDir.listFiles();
assertEquals(1, directories.length);
- // When depage happened, a new empty page was supposed to be opened, what will create 3 files
- assertEquals("Missing a file, supposed to have address.txt, 1st page and 2nd page",
- 3,
- directories[0].list().length);
+ if (!transacted)
+ {
+ // When depage happened, a new empty page was supposed to be opened, what will create 3 files
+ assertEquals("Missing a file, supposed to have address.txt, 1st page and 2nd page",
+ 3,
+ directories[0].list().length);
+ }
Configuration config = createDefaultConfig();
@@ -122,7 +135,7 @@
/** This method will leave garbage on paging.
* It will not delete page files as if the server crashed right after commit,
* and before removing the file*/
- private void pageAndFail() throws Exception
+ private void pageAndFail(final boolean transacted) throws Exception
{
clearData();
Configuration config = createDefaultConfig();
@@ -142,7 +155,7 @@
sf.setBlockOnPersistentSend(true);
sf.setBlockOnAcknowledge(true);
- ClientSession session = sf.createSession(null, null, false, true, true, false, 0);
+ ClientSession session = sf.createSession(null, null, false, !transacted, !transacted, false, 0);
session.createQueue(ADDRESS, ADDRESS, null, true);
@@ -150,7 +163,7 @@
ClientMessage message = session.createClientMessage(true);
message.getBodyBuffer().writeBytes(new byte[1024]);
-
+
PagingStore store = server.getPostOffice().getPagingManager().getPageStore(ADDRESS);
int messages = 0;
@@ -158,6 +171,10 @@
{
producer.send(message);
messages++;
+ if (transacted && messages % 100 == 0)
+ {
+ session.commit();
+ }
}
for (int i = 0; i < 2; i++)
@@ -166,6 +183,8 @@
producer.send(message);
}
+ session.commit();
+
session.close();
assertTrue(server.getPostOffice().getPagingManager().getTotalMemory() > 0);
15 years, 1 month
JBoss hornetq SVN: r8585 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-05 14:37:17 -0500 (Sat, 05 Dec 2009)
New Revision: 8585
Removed:
tags/hornetq_2_0_0_CR1_pending/
Log:
not needed
15 years, 1 month
JBoss hornetq SVN: r8584 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-05 14:31:50 -0500 (Sat, 05 Dec 2009)
New Revision: 8584
Added:
tags/hornetq_2_0_0_CR1_pending/
Log:
created pending tag for HornetQ 2.0.0.CR1
Copied: tags/hornetq_2_0_0_CR1_pending (from rev 8583, trunk)
15 years, 1 month
JBoss hornetq SVN: r8583 - trunk/src/main/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-12-05 11:21:45 -0500 (Sat, 05 Dec 2009)
New Revision: 8583
Modified:
trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
Log:
fix MultiThreadRandomFailoverTest etc
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2009-12-05 13:10:42 UTC (rev 8582)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2009-12-05 16:21:45 UTC (rev 8583)
@@ -178,6 +178,8 @@
private volatile boolean workDone;
private final String groupID;
+
+ private volatile boolean inClose;
// Constructors ----------------------------------------------------------------------------
@@ -487,6 +489,10 @@
rollbackOnFailover();
}
+ else
+ {
+ throw e;
+ }
}
workDone = false;
@@ -750,7 +756,7 @@
public void close() throws HornetQException
{
if (closed)
- {
+ {
return;
}
@@ -760,11 +766,16 @@
closeChildren();
+ inClose = true;
+
channel.sendBlocking(new SessionCloseMessage());
}
- catch (Throwable ignore)
+ catch (Throwable e)
{
// Session close should always return without exception
+
+ //Note - we only log at trace
+ log.trace("Failed to close session", e);
}
doCleanup();
@@ -829,114 +840,120 @@
else
{
// The session wasn't found on the server - probably we're failing over onto a backup server where the
- // session
- // won't exist or the target server has been restarted - in this case the session will need to be recreated,
+ // session won't exist or the target server has been restarted - in this case the session will need to be recreated,
// and we'll need to recreate any consumers
-
- Packet createRequest = new CreateSessionMessage(name,
- channel.getID(),
- version,
- username,
- password,
- minLargeMessageSize,
- xa,
- autoCommitSends,
- autoCommitAcks,
- preAcknowledge,
- confirmationWindowSize);
- boolean retry = false;
- do
+
+ // It could also be that the server hasn't been restarted, but the session is currently executing close, and that
+ // has already been executed on the server, that's why we can't find the session- in this case we *don't* want
+ // to recreate the session, we just want to unblock the blocking call
+ if (!inClose)
{
- try
+ Packet createRequest = new CreateSessionMessage(name,
+ channel.getID(),
+ version,
+ username,
+ password,
+ minLargeMessageSize,
+ xa,
+ autoCommitSends,
+ autoCommitAcks,
+ preAcknowledge,
+ confirmationWindowSize);
+ boolean retry = false;
+ do
{
- channel1.sendBlocking(createRequest);
- retry = false;
- }
- catch (HornetQException e)
- {
- // the session was created while its server was starting, retry it:
- if (e.getCode() == HornetQException.SESSION_CREATION_REJECTED)
+ try
{
- log.warn("Server is starting, retry to create the session " + name);
- retry = true;
- // sleep a little bit to avoid spinning too much
- Thread.sleep(10);
+ channel1.sendBlocking(createRequest);
+ retry = false;
}
- else
+ catch (HornetQException e)
{
- throw e;
+ // the session was created while its server was starting, retry it:
+ if (e.getCode() == HornetQException.SESSION_CREATION_REJECTED)
+ {
+ log.warn("Server is starting, retry to create the session " + name);
+ retry = true;
+ // sleep a little bit to avoid spinning too much
+ Thread.sleep(10);
+ }
+ else
+ {
+ throw e;
+ }
}
}
- }
- while (retry);
-
- channel.clearCommands();
-
- for (Map.Entry<Long, ClientConsumerInternal> entry : consumers.entrySet())
- {
- SessionCreateConsumerMessage createConsumerRequest = new SessionCreateConsumerMessage(entry.getKey(),
- entry.getValue()
- .getQueueName(),
- entry.getValue()
- .getFilterString(),
- entry.getValue()
- .isBrowseOnly(),
- false);
-
- createConsumerRequest.setChannelID(channel.getID());
-
- Connection conn = channel.getConnection().getTransportConnection();
-
- HornetQBuffer buffer = createConsumerRequest.encode(channel.getConnection());
-
- conn.write(buffer, false);
-
- int clientWindowSize = entry.getValue().getClientWindowSize();
-
- if (clientWindowSize != 0)
+ while (retry);
+
+ channel.clearCommands();
+
+ for (Map.Entry<Long, ClientConsumerInternal> entry : consumers.entrySet())
{
- SessionConsumerFlowCreditMessage packet = new SessionConsumerFlowCreditMessage(entry.getKey(),
- clientWindowSize);
-
- packet.setChannelID(channel.getID());
-
- buffer = packet.encode(channel.getConnection());
-
+ SessionCreateConsumerMessage createConsumerRequest = new SessionCreateConsumerMessage(entry.getKey(),
+ entry.getValue()
+ .getQueueName(),
+ entry.getValue()
+ .getFilterString(),
+ entry.getValue()
+ .isBrowseOnly(),
+ false);
+
+ createConsumerRequest.setChannelID(channel.getID());
+
+ Connection conn = channel.getConnection().getTransportConnection();
+
+ HornetQBuffer buffer = createConsumerRequest.encode(channel.getConnection());
+
conn.write(buffer, false);
+
+ int clientWindowSize = entry.getValue().getClientWindowSize();
+
+ if (clientWindowSize != 0)
+ {
+ SessionConsumerFlowCreditMessage packet = new SessionConsumerFlowCreditMessage(entry.getKey(),
+ clientWindowSize);
+
+ packet.setChannelID(channel.getID());
+
+ buffer = packet.encode(channel.getConnection());
+
+ conn.write(buffer, false);
+ }
}
- }
-
- if ((!autoCommitAcks || !autoCommitSends) && workDone)
- {
- // Session is transacted - set for rollback only
- // FIXME - there is a race condition here - a commit could sneak in before this is set
- rollbackOnly = true;
- }
-
- // Now start the session if it was already started
- if (started)
- {
- for (ClientConsumerInternal consumer : consumers.values())
+
+ if ((!autoCommitAcks || !autoCommitSends) && workDone)
{
- consumer.clearAtFailover();
- consumer.start();
+ // Session is transacted - set for rollback only
+ // FIXME - there is a race condition here - a commit could sneak in before this is set
+ rollbackOnly = true;
}
-
- Packet packet = new PacketImpl(PacketImpl.SESS_START);
-
- packet.setChannelID(channel.getID());
-
- Connection conn = channel.getConnection().getTransportConnection();
-
- HornetQBuffer buffer = packet.encode(channel.getConnection());
-
- conn.write(buffer, false);
+
+ // Now start the session if it was already started
+ if (started)
+ {
+ for (ClientConsumerInternal consumer : consumers.values())
+ {
+ consumer.clearAtFailover();
+ consumer.start();
+ }
+
+ Packet packet = new PacketImpl(PacketImpl.SESS_START);
+
+ packet.setChannelID(channel.getID());
+
+ Connection conn = channel.getConnection().getTransportConnection();
+
+ HornetQBuffer buffer = packet.encode(channel.getConnection());
+
+ conn.write(buffer, false);
+ }
+
+ resetCreditManager = true;
}
-
- resetCreditManager = true;
-
+
channel.returnBlocking();
}
+
}
catch (Throwable t)
{
@@ -1007,8 +1024,6 @@
if (rollbackOnly)
{
- rollback(xid);
-
throw new XAException(XAException.XA_RBOTHER);
}
15 years, 1 month
JBoss hornetq SVN: r8582 - in trunk: docs/user-manual/en and 2 other directories.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-12-05 08:10:42 -0500 (Sat, 05 Dec 2009)
New Revision: 8582
Modified:
trunk/docs/quickstart-guide/en/installation.xml
trunk/docs/user-manual/en/using-server.xml
trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
Log:
a few tweaks to docs, examples and set its back to 5
Modified: trunk/docs/quickstart-guide/en/installation.xml
===================================================================
--- trunk/docs/quickstart-guide/en/installation.xml 2009-12-05 12:10:28 UTC (rev 8581)
+++ trunk/docs/quickstart-guide/en/installation.xml 2009-12-05 13:10:42 UTC (rev 8582)
@@ -105,9 +105,8 @@
directory where you installed JBoss AS 5</para>
</listitem>
<listitem>
- <para>run <literal>./build.sh</literal> (or <literal>build.bat</literal> if you
- are on Windows) in HornetQ's <literal>config/jboss-as</literal>
- directory</para>
+ <para>run <literal>./build.sh</literal> (or <literal>build.bat</literal> if you are on
+ Windows) in HornetQ's <literal>config/jboss-as</literal> directory</para>
</listitem>
</orderedlist>
<para>This will create 2 new profiles in <literal>$JBOSS_HOME/server</literal>:</para>
@@ -131,8 +130,8 @@
<note>
<para>HornetQ can be deployed on AS 4 but isn't recommended</para>
</note>
- <para>As in AS 4, it is not shipped by default with the application server and you need to create
- new AS 4 profiles to run AS 4 with HornetQ.</para>
+ <para>As in AS 4, it is not shipped by default with the application server and you need to
+ create new AS 4 profiles to run AS 4 with HornetQ.</para>
<para>To create AS 4 profiles:</para>
<orderedlist>
<listitem>
@@ -144,7 +143,7 @@
</listitem>
<listitem>
<para>run <literal><literal>./build.sh</literal> (or <literal>build.bat</literal> if you
- are on Windows) as4</literal> in HornetQ's <literal>config/jboss-as</literal>
+ are on Windows)</literal> in HornetQ's <literal>config/jboss-as</literal>
directory</para>
</listitem>
</orderedlist>
Modified: trunk/docs/user-manual/en/using-server.xml
===================================================================
--- trunk/docs/user-manual/en/using-server.xml 2009-12-05 12:10:28 UTC (rev 8581)
+++ trunk/docs/user-manual/en/using-server.xml 2009-12-05 13:10:42 UTC (rev 8582)
@@ -101,11 +101,7 @@
</section>
<section>
<title>System properties</title>
- <para>HornetQ also takes a couple of Java system properties on the command line for
- configuring logging properties</para>
- <para>HornetQ uses JDK logging to minimise dependencies on other logging systems. JDK
- logging can then be configured to delegate to some other framework, e.g. log4j if that's
- what you prefer.</para>
+ <para>HornetQ can take a system property on the command line for configuring logging.</para>
<para>For more information on configuring logging, please see <xref linkend="logging"
/>.</para>
</section>
Modified: trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java
===================================================================
--- trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java 2009-12-05 12:10:28 UTC (rev 8581)
+++ trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java 2009-12-05 13:10:42 UTC (rev 8582)
@@ -23,6 +23,7 @@
import javax.naming.InitialContext;
import org.hornetq.common.example.HornetQExample;
+import org.hornetq.core.message.impl.MessageImpl;
/**
* A simple example that demonstrates failover of the JMS connection from one node to another
@@ -71,7 +72,7 @@
for (int i = 0; i < numMessages; i++)
{
TextMessage message = session.createTextMessage("This is text message " + i);
- producer.send(message);
+
System.out.println("Sent message: " + message.getText());
}
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java 2009-12-05 12:10:28 UTC (rev 8581)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java 2009-12-05 13:10:42 UTC (rev 8582)
@@ -1159,7 +1159,7 @@
protected int getNumIterations()
{
- return 200000;
+ return 5;
}
@Override
15 years, 1 month
JBoss hornetq SVN: r8581 - in trunk: examples/jms/transaction-failover/src/org/hornetq/jms/example and 3 other directories.
by do-not-reply@jboss.org
Author: timfox
Date: 2009-12-05 07:10:28 -0500 (Sat, 05 Dec 2009)
New Revision: 8581
Modified:
trunk/docs/user-manual/en/ha.xml
trunk/examples/jms/transaction-failover/src/org/hornetq/jms/example/TransactionFailoverExample.java
trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/DelayInterceptor2.java
trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
Log:
fixed transaction example and some small changes to transaction rollback
Modified: trunk/docs/user-manual/en/ha.xml
===================================================================
--- trunk/docs/user-manual/en/ha.xml 2009-12-05 11:25:58 UTC (rev 8580)
+++ trunk/docs/user-manual/en/ha.xml 2009-12-05 12:10:28 UTC (rev 8581)
@@ -68,8 +68,8 @@
>hornetq-configuration.xml</literal>, configure the live server with
knowledge of its backup server. This is done by specifying a <literal
>backup-connector-ref</literal> element. This element references a
- connector, also specified on the live server which specifies how
- to connect to the backup server.</para>
+ connector, also specified on the live server which specifies how to connect
+ to the backup server.</para>
<para>Here's a snippet from live server's <literal
>hornetq-configuration.xml</literal> configured to connect to its backup
server:</para>
@@ -86,8 +86,8 @@
</connector>
</connectors></programlisting>
<para>Secondly, on the backup server, we flag the server as a backup and make
- sure it has an acceptor that the live server can connect to. We also make sure the shared-store paramater is
- set to false:</para>
+ sure it has an acceptor that the live server can connect to. We also make
+ sure the shared-store paramater is set to false:</para>
<programlisting>
<backup>true</backup>
@@ -104,8 +104,8 @@
<para>For a backup server to function correctly it's also important that it has
the same set of bridges, predefined queues, cluster connections, broadcast
groups and discovery groups as defined on the live node. The easiest way to
- ensure this is to copy the entire server side configuration from live
- to backup and just make the changes as specified above. </para>
+ ensure this is to copy the entire server side configuration from live to
+ backup and just make the changes as specified above. </para>
</section>
<section>
<title>Synchronizing a Backup Node to a Live Node</title>
@@ -247,46 +247,52 @@
linkend="examples.non-transaction-failover"/>.</para>
<section id="ha.automatic.failover.noteonreplication">
<title>A Note on Server Replication</title>
- <para>HornetQ does not replicate full server state betwen live and backup servers.
- When the new session is automatically recreated on the backup it won't have
- any knowledge of messages already sent or acknowledged in that session. Any
- inflight sends or acknowledgements at the time of failover might also be
+ <para>HornetQ does not replicate full server state betwen live and backup servers.
+ When the new session is automatically recreated on the backup it won't have any
+ knowledge of messages already sent or acknowledged in that session. Any
+ in-flight sends or acknowledgements at the time of failover might also be
lost.</para>
<para>By replicating full server state, theoretically we could provide a 100%
transparent seamless failover, which would avoid any lost messages or
acknowledgements, however this comes at a great cost: replicating the full
- server state (including the queues, session, etc.). This would require replication of
- the entire server state machine; every operation on the live server would have
- to replicated on the replica server(s) in the exact same global order to ensure
- a consistent replica state. This is extremely hard to do in a performant and
- scalable way, especially when one considers that multiple threads are changing
- the live server state concurrently.</para>
- <para>Some solutions which provide full state machine replication use
+ server state (including the queues, session, etc.). This would require
+ replication of the entire server state machine; every operation on the live
+ server would have to replicated on the replica server(s) in the exact same
+ global order to ensure a consistent replica state. This is extremely hard to do
+ in a performant and scalable way, especially when one considers that multiple
+ threads are changing the live server state concurrently.</para>
+ <para>Some messaging systems which provide full state machine replication use
techniques such as <emphasis role="italic">virtual synchrony</emphasis>, but
this does not scale well and effectively serializes all operations to a single
thread, dramatically reducing concurrency.</para>
<para>Other techniques for multi-threaded active replication exist such as
replicating lock states or replicating thread scheduling but this is very hard
to achieve at a Java level.</para>
- <para>Consequently it xas decided it was not worth massively reducing performance and
- concurrency for the sake of 100% transparent failover. Even without 100%
+ <para>Consequently it xas decided it was not worth massively reducing performance
+ and concurrency for the sake of 100% transparent failover. Even without 100%
transparent failover, it is simple to guarantee <emphasis role="italic">once and
- only once</emphasis> delivery, even in the case of failure, by
- using a combination of duplicate detection and retrying of transactions. However
- this is not 100% transparent to the client code.</para>
+ only once</emphasis> delivery, even in the case of failure, by using a
+ combination of duplicate detection and retrying of transactions. However this is
+ not 100% transparent to the client code.</para>
</section>
<section id="ha.automatic.failover.blockingcalls">
<title>Handling Blocking Calls During Failover</title>
- <para>If the client code is in a blocking call to the server, waiting for
- a response to continue its execution, when failover occurs, the new session
- will not have any knowledge of the call that was in progress. This call might
- otherwise hang for ever, waiting for a response that will never come.</para>
- <para>To prevent this, HornetQ will unblock any blocking calls that were in
- progress at the time of failover by making them throw a <literal
+ <para>If the client code is in a blocking call to the server, waiting for a response
+ to continue its execution, when failover occurs, the new session will not have
+ any knowledge of the call that was in progress. This call might otherwise hang
+ for ever, waiting for a response that will never come.</para>
+ <para>To prevent this, HornetQ will unblock any blocking calls that were in progress
+ at the time of failover by making them throw a <literal
>javax.jms.JMSException</literal> (if using JMS), or a <literal
>HornetQException</literal> with error code <literal
>HornetQException.UNBLOCKED</literal>. It is up to the client code to catch
this exception and retry any operations if desired.</para>
+ <para>If the method being unblocked is a call to commit(), or prepare(), then the
+ transaction will be automatically rolled back and HornetQ will throw a <literal
+ >javax.jms.TransactionRolledBackException</literal> (if using JMS), or a
+ <literal>HornetQException</literal> with error code <literal
+ >HornetQException.TRANSACTION_ROLLED_BACK</literal> if using the core
+ API.</para>
</section>
<section id="ha.automatic.failover.transactions">
<title>Handling Failover With Transactions</title>
@@ -302,15 +308,15 @@
<para>It is up to the user to catch the exception, and perform any client side local
rollback code as necessary. The user can then just retry the transactional
operations again on the same session.</para>
- <para>HornetQ ships with a fully functioning example demonstrating how to do this, please
- see <xref linkend="examples.transaction-failover"/></para>
+ <para>HornetQ ships with a fully functioning example demonstrating how to do this,
+ please see <xref linkend="examples.transaction-failover"/></para>
<para>If failover occurs when a commit call is being executed, the server, as
previously described, will unblock the call to prevent a hang, since no response
- will come back. In this case it is not easy for the
- client to determine whether the transaction commit was actually processed on the
- live server before failure occurred.</para>
+ will come back. In this case it is not easy for the client to determine whether
+ the transaction commit was actually processed on the live server before failure
+ occurred.</para>
<para>To remedy this, the client can simply enable duplicate detection (<xref
- linkend="duplicate-detection"/>) in the transaction, and retry the
+ linkend="duplicate-detection"/>) in the transaction, and retry the
transaction operations again after the call is unblocked. If the transaction had
indeed been committed on the live server successfully before failover, then when
the transaction is retried, duplicate detection will ensure that any persistent
@@ -325,14 +331,12 @@
</section>
<section id="ha.automatic.failover.nontransactional">
<title>Handling Failover With Non Transactional Sessions</title>
- <para>If the session is non transactional, messages or
- acknowledgements can be lost in the event of failover.</para>
+ <para>If the session is non transactional, messages or acknowledgements can be lost
+ in the event of failover.</para>
<para>If you wish to provide <emphasis role="italic">once and only once</emphasis>
- delivery guarantees for non transacted sessions too, then make sure you send
- messages blocking, enabled duplicate detection, and catch unblock exceptions as
- described in <xref linkend="ha.automatic.failover.blockingcalls"/></para>
- <para>However bear in mind that sending messages and acknowledgements blocking will
- incur performance penalties due to the network round trip involved.</para>
+ delivery guarantees for non transacted sessions too, enabled duplicate
+ detection, and catch unblock exceptions as described in <xref
+ linkend="ha.automatic.failover.blockingcalls"/></para>
</section>
</section>
<section>
@@ -365,8 +369,8 @@
server.</para>
<para>For a working example of application-level failover, please see <xref
linkend="application-level-failover"/>.</para>
- <para>If you are using the core API, then the procedure is very similar: you would set
- a <literal>FailureListener</literal> on the core <literal>ClientSession</literal>
+ <para>If you are using the core API, then the procedure is very similar: you would set a
+ <literal>FailureListener</literal> on the core <literal>ClientSession</literal>
instances.</para>
</section>
</section>
Modified: trunk/examples/jms/transaction-failover/src/org/hornetq/jms/example/TransactionFailoverExample.java
===================================================================
--- trunk/examples/jms/transaction-failover/src/org/hornetq/jms/example/TransactionFailoverExample.java 2009-12-05 11:25:58 UTC (rev 8580)
+++ trunk/examples/jms/transaction-failover/src/org/hornetq/jms/example/TransactionFailoverExample.java 2009-12-05 12:10:28 UTC (rev 8581)
@@ -14,6 +14,7 @@
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
@@ -23,6 +24,7 @@
import javax.naming.InitialContext;
import org.hornetq.common.example.HornetQExample;
+import org.hornetq.core.message.impl.MessageImpl;
/**
* A simple example that demonstrates failover of the JMS connection from one node to another
@@ -59,7 +61,7 @@
// Step 4. We create a *transacted* JMS Session
Session session = connection.createSession(true, 0);
-
+
// Step 5. We start the connection to ensure delivery occurs
connection.start();
@@ -76,25 +78,37 @@
try
{
session.commit();
- } catch (TransactionRolledBackException e)
+ }
+ catch (TransactionRolledBackException e)
{
System.err.println("transaction has been rolled back: " + e.getMessage());
}
// Step 10. We resend all the messages
sendMessages(session, producer, numMessages, false);
- // Step 11. We commit the session succesfully: the messages will be all delivered to the activated backup server
+
+ // Step 11. We commit the session succesfully: the messages will be all delivered to the activated backup
+ // server
session.commit();
-
// Step 12. We are now transparently reconnected to server #0, the backup server.
// We consume the messages sent before the crash of the live server and commit the session.
for (int i = 0; i < numMessages; i++)
{
TextMessage message0 = (TextMessage)consumer.receive(5000);
+
+ if (message0 == null)
+ {
+ System.err.println("Example failed - message wasn't received");
+
+ return false;
+ }
+
System.out.println("Got message: " + message0.getText());
}
+
session.commit();
+
System.out.println("Other message on the server? " + consumer.receive(5000));
return true;
@@ -121,19 +135,36 @@
for (int i = 0; i < numMessages / 2; i++)
{
TextMessage message = session.createTextMessage("This is text message " + i);
+
+ //We set the duplicate detection header - so the server will ignore the same message
+ //if sent again after failover
+
+ message.setStringProperty(MessageImpl.HDR_DUPLICATE_DETECTION_ID.toString(), "uniqueid" + i);
+
producer.send(message);
+
System.out.println("Sent message: " + message.getText());
}
+
if (killServer)
{
killServer(1);
+
Thread.sleep(2000);
}
+
// We send the remaining half of messages
for (int i = numMessages / 2; i < numMessages; i++)
{
TextMessage message = session.createTextMessage("This is text message " + i);
+
+ //We set the duplicate detection header - so the server will ignore the same message
+ //if sent again after failover
+
+ message.setStringProperty(MessageImpl.HDR_DUPLICATE_DETECTION_ID.toString(), "uniqueid" + i);
+
producer.send(message);
+
System.out.println("Sent message: " + message.getText());
}
}
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2009-12-05 11:25:58 UTC (rev 8580)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientSessionImpl.java 2009-12-05 12:10:28 UTC (rev 8581)
@@ -454,6 +454,14 @@
{
return this;
}
+
+ private void rollbackOnFailover() throws HornetQException
+ {
+ rollback(false);
+
+ throw new HornetQException(TRANSACTION_ROLLED_BACK,
+ "The transaction was rolled back on failover to a backup server");
+ }
public void commit() throws HornetQException
{
@@ -461,15 +469,25 @@
if (rollbackOnly)
{
- rollback(false);
-
- throw new HornetQException(TRANSACTION_ROLLED_BACK,
- "The transaction was rolled back on failover to a backup server");
+ rollbackOnFailover();
}
flushAcks();
- channel.sendBlocking(new PacketImpl(PacketImpl.SESS_COMMIT));
+ try
+ {
+ channel.sendBlocking(new PacketImpl(PacketImpl.SESS_COMMIT));
+ }
+ catch (HornetQException e)
+ {
+ if (e.getCode() == HornetQException.UNBLOCKED)
+ {
+ //The call to commit was unlocked on failover, we therefore rollback the tx,
+ //and throw a transaction rolled back exception instead
+
+ rollbackOnFailover();
+ }
+ }
workDone = false;
}
@@ -732,8 +750,7 @@
public void close() throws HornetQException
{
if (closed)
- {
- log.info("Already closed so not closing");
+ {
return;
}
@@ -990,6 +1007,8 @@
if (rollbackOnly)
{
+ rollback(xid);
+
throw new XAException(XAException.XA_RBOTHER);
}
@@ -1012,6 +1031,23 @@
catch (HornetQException e)
{
log.warn(e.getMessage(), e);
+
+ if (e.getCode() == HornetQException.UNBLOCKED)
+ {
+ //Unblocked on failover
+
+ try
+ {
+ rollback(false);
+ }
+ catch (HornetQException e2)
+ {
+ throw new XAException(XAException.XAER_RMERR);
+ }
+
+ throw new XAException(XAException.XA_RBOTHER);
+ }
+
// This should never occur
throw new XAException(XAException.XAER_RMERR);
}
@@ -1122,7 +1158,7 @@
public int prepare(final Xid xid) throws XAException
{
checkXA();
-
+
if (rollbackOnly)
{
throw new XAException(XAException.XA_RBOTHER);
@@ -1148,6 +1184,24 @@
}
catch (HornetQException e)
{
+ log.warn(e.getMessage(), e);
+
+ if (e.getCode() == HornetQException.UNBLOCKED)
+ {
+ //Unblocked on failover
+
+ try
+ {
+ rollback(false);
+ }
+ catch (HornetQException e2)
+ {
+ throw new XAException(XAException.XAER_RMERR);
+ }
+
+ throw new XAException(XAException.XA_RBOTHER);
+ }
+
// This should never occur
throw new XAException(XAException.XAER_RMERR);
}
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/DelayInterceptor2.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/DelayInterceptor2.java 2009-12-05 11:25:58 UTC (rev 8580)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/DelayInterceptor2.java 2009-12-05 12:10:28 UTC (rev 8581)
@@ -31,11 +31,15 @@
{
private static final Logger log = Logger.getLogger(DelayInterceptor2.class);
+ private volatile boolean loseResponse = true;
+
public boolean intercept(Packet packet, RemotingConnection connection) throws HornetQException
{
- if (packet.getType() == PacketImpl.NULL_RESPONSE)
+ if (packet.getType() == PacketImpl.NULL_RESPONSE && loseResponse)
{
- //Lose the response from the commit
+ //Lose the response from the commit - only lose the first one
+
+ loseResponse = false;
return false;
}
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2009-12-05 11:25:58 UTC (rev 8580)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/failover/FailoverTest.java 2009-12-05 12:10:28 UTC (rev 8581)
@@ -44,7 +44,6 @@
import org.hornetq.core.remoting.impl.invm.TransportConstants;
import org.hornetq.core.transaction.impl.XidImpl;
import org.hornetq.jms.client.HornetQTextMessage;
-import org.hornetq.tests.util.RandomUtil;
import org.hornetq.utils.SimpleString;
/**
@@ -1952,30 +1951,32 @@
{
sf.addInterceptor(interceptor);
+ log.info("attempting commit");
session.commit();
}
catch (HornetQException e)
{
- if (e.getCode() == HornetQException.UNBLOCKED)
+ if (e.getCode() == HornetQException.TRANSACTION_ROLLED_BACK)
{
+ log.info("got transaction rolled back");
+
// Ok - now we retry the commit after removing the interceptor
sf.removeInterceptor(interceptor);
try
{
+ log.info("trying to commit again");
session.commit();
- fail("commit succeeded");
+ log.info("committed again ok");
+
+ failed = false;
}
catch (HornetQException e2)
{
- if (e2.getCode() == HornetQException.TRANSACTION_ROLLED_BACK)
- {
- // Ok
-
- failed = false;
- }
+
}
+
}
}
}
@@ -1990,6 +1991,8 @@
Thread.sleep(500);
fail(session, latch);
+
+ log.info("connection has failed");
committer.join();
@@ -2104,7 +2107,7 @@
}
catch (HornetQException e)
{
- if (e.getCode() == HornetQException.UNBLOCKED)
+ if (e.getCode() == HornetQException.TRANSACTION_ROLLED_BACK)
{
// Ok - now we retry the commit after removing the interceptor
@@ -2113,15 +2116,11 @@
try
{
session.commit();
+
+ failed = false;
}
catch (HornetQException e2)
- {
- if (e2.getCode() == HornetQException.TRANSACTION_ROLLED_BACK)
- {
- // Ok
-
- failed = false;
- }
+ {
}
}
}
Modified: trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java 2009-12-05 11:25:58 UTC (rev 8580)
+++ trunk/tests/src/org/hornetq/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java 2009-12-05 12:10:28 UTC (rev 8581)
@@ -1159,7 +1159,7 @@
protected int getNumIterations()
{
- return 5;
+ return 200000;
}
@Override
15 years, 1 month
JBoss hornetq SVN: r8580 - trunk/examples/javaee/mdb-bmt/server.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-05 06:25:58 -0500 (Sat, 05 Dec 2009)
New Revision: 8580
Modified:
trunk/examples/javaee/mdb-bmt/server/hornetq-configuration.xml
Log:
config fix
Modified: trunk/examples/javaee/mdb-bmt/server/hornetq-configuration.xml
===================================================================
--- trunk/examples/javaee/mdb-bmt/server/hornetq-configuration.xml 2009-12-05 10:29:48 UTC (rev 8579)
+++ trunk/examples/javaee/mdb-bmt/server/hornetq-configuration.xml 2009-12-05 11:25:58 UTC (rev 8580)
@@ -52,7 +52,6 @@
<address-settings>
<!--default for catch all-->
<address-setting match="#">
- <clustered>false</clustered>
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay>
15 years, 1 month
JBoss hornetq SVN: r8579 - trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-05 05:29:48 -0500 (Sat, 05 Dec 2009)
New Revision: 8579
Modified:
trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java
Log:
upped sleep to allow server to start
Modified: trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java
===================================================================
--- trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java 2009-12-05 09:58:45 UTC (rev 8578)
+++ trunk/examples/jms/non-transaction-failover/src/org/hornetq/jms/example/NonTransactionFailoverExample.java 2009-12-05 10:29:48 UTC (rev 8579)
@@ -94,7 +94,7 @@
// Step 10. Crash server #1, the live server, and wait a little while to make sure
// it has really crashed
killServer(1);
- Thread.sleep(2000);
+ Thread.sleep(5000);
// Step 11. Acknowledging the 2nd half of the sent messages will fail as failover to the
// backup server has occured
15 years, 1 month
JBoss hornetq SVN: r8578 - in trunk: docs/quickstart-guide and 3 other directories.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-05 04:58:45 -0500 (Sat, 05 Dec 2009)
New Revision: 8578
Added:
trunk/docs/quickstart-guide/build.bat
trunk/docs/quickstart-guide/build.sh
trunk/docs/user-manual/build.bat
trunk/docs/user-manual/build.sh
trunk/src/config/jboss-as/build.bat
trunk/src/config/jboss-as/build.sh
Modified:
trunk/build-hornetq.xml
trunk/docs/quickstart-guide/en/installation.xml
Log:
added build scripts and updated docs
Modified: trunk/build-hornetq.xml
===================================================================
--- trunk/build-hornetq.xml 2009-12-05 09:32:24 UTC (rev 8577)
+++ trunk/build-hornetq.xml 2009-12-05 09:58:45 UTC (rev 8578)
@@ -864,6 +864,7 @@
<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"/>
<copy todir="${build.distro.bin.dir}">
<fileset dir="${native.bin.dir}">
<include name="*.so"/>
Copied: trunk/docs/quickstart-guide/build.bat (from rev 8576, trunk/examples/core/embedded-remote/build.bat)
===================================================================
--- trunk/docs/quickstart-guide/build.bat (rev 0)
+++ trunk/docs/quickstart-guide/build.bat 2009-12-05 09:58:45 UTC (rev 8578)
@@ -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/docs/quickstart-guide/build.sh (from rev 8576, trunk/examples/core/embedded-remote/build.sh)
===================================================================
--- trunk/docs/quickstart-guide/build.sh (rev 0)
+++ trunk/docs/quickstart-guide/build.sh 2009-12-05 09:58:45 UTC (rev 8578)
@@ -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
+
+
+
Modified: trunk/docs/quickstart-guide/en/installation.xml
===================================================================
--- trunk/docs/quickstart-guide/en/installation.xml 2009-12-05 09:32:24 UTC (rev 8577)
+++ trunk/docs/quickstart-guide/en/installation.xml 2009-12-05 09:58:45 UTC (rev 8578)
@@ -105,7 +105,8 @@
directory where you installed JBoss AS 5</para>
</listitem>
<listitem>
- <para>run <literal>ant</literal> in HornetQ's <literal>config/jboss-as</literal>
+ <para>run <literal>./build.sh</literal> (or <literal>build.bat</literal> if you
+ are on Windows) in HornetQ's <literal>config/jboss-as</literal>
directory</para>
</listitem>
</orderedlist>
@@ -142,7 +143,8 @@
directory where you installed JBoss AS 4</para>
</listitem>
<listitem>
- <para>run <literal>ant as4</literal> in HornetQ's <literal>config/jboss-as</literal>
+ <para>run <literal><literal>./build.sh</literal> (or <literal>build.bat</literal> if you
+ are on Windows) as4</literal> in HornetQ's <literal>config/jboss-as</literal>
directory</para>
</listitem>
</orderedlist>
Copied: trunk/docs/user-manual/build.bat (from rev 8576, trunk/examples/core/embedded-remote/build.bat)
===================================================================
--- trunk/docs/user-manual/build.bat (rev 0)
+++ trunk/docs/user-manual/build.bat 2009-12-05 09:58:45 UTC (rev 8578)
@@ -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/docs/user-manual/build.sh (from rev 8576, trunk/examples/core/embedded-remote/build.sh)
===================================================================
--- trunk/docs/user-manual/build.sh (rev 0)
+++ trunk/docs/user-manual/build.sh 2009-12-05 09:58:45 UTC (rev 8578)
@@ -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
+
+
+
Copied: trunk/src/config/jboss-as/build.bat (from rev 8576, trunk/examples/core/embedded-remote/build.bat)
===================================================================
--- trunk/src/config/jboss-as/build.bat (rev 0)
+++ trunk/src/config/jboss-as/build.bat 2009-12-05 09:58:45 UTC (rev 8578)
@@ -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/build.sh (from rev 8576, trunk/examples/core/embedded-remote/build.sh)
===================================================================
--- trunk/src/config/jboss-as/build.sh (rev 0)
+++ trunk/src/config/jboss-as/build.sh 2009-12-05 09:58:45 UTC (rev 8578)
@@ -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
+
+
+
15 years, 1 month
JBoss hornetq SVN: r8577 - tags.
by do-not-reply@jboss.org
Author: ataylor
Date: 2009-12-05 04:32:24 -0500 (Sat, 05 Dec 2009)
New Revision: 8577
Removed:
tags/hornetq_2_0_0_CR1_pending/
Log:
removing pending
15 years, 1 month